Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   Development Open Discussion (https://www.gnutellaforums.com/development-open-discussion/)
-   -   Dealing With Received Queries (https://www.gnutellaforums.com/development-open-discussion/90100-dealing-received-queries.html)

thucydides January 11th, 2009 07:47 PM

Dealing With Received Queries
 
Hi,

What Java Class deals with Received Queries in Phex 3.4 Source Code? I am looking through the package phex.query but cannot pick out the right class (if I am even in the right package).

Thanks,

thucydides

GregorK January 12th, 2009 12:50 AM

phex.msghandling.MessageDispatcher.handleQuery()

You can also hook your own class into it:

Code:

public class MyClass implements MessageSubscriber<QueryMsg> {
  public void onMessage(QueryMsg query, Host sourceHost) {
    ...
  }
}
MyClass c = new MyClass();
Servent.getInstance().getMessageService().addMessageSubscriber(
  QueryMsg.class, c);


thucydides January 12th, 2009 04:41 AM

Awesome, thanks for the quick reply!


All times are GMT -7. The time now is 02:00 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.