Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > Phex (Cross-platform) > Development & Coding > Development Open Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

Development Open Discussion Anything else about the Phex development


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old January 11th, 2009
Apprentice
 
Join Date: January 5th, 2009
Posts: 7
thucydides is flying high
Default 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
Reply With Quote
  #2 (permalink)  
Old January 12th, 2009
Phex Developer
 
Join Date: May 8th, 2001
Location: Stuttgart, Germany
Posts: 988
GregorK is flying high
Default

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);
__________________
Reply With Quote
  #3 (permalink)  
Old January 12th, 2009
Apprentice
 
Join Date: January 5th, 2009
Posts: 7
thucydides is flying high
Default

Awesome, thanks for the quick reply!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 12:49 PM.


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

Copyright © 2020 Gnutella Forums.
All Rights Reserved.