I'm sorry if I didn't explained what I want. I wanted something like this (taken from JTella examples):
...
try
{
// Start a network connection and listen for succesful connection
GNUTellaConnection c = new GNUTellaConnection(host, port);
c.getSearchMonitorSession(new TestReceiver());
c.start();
}
catch (Exception e)
{
e.printStackTrace();
}
}
/**
* Test class for monitoring query messages, prints out queries to the console
*
*/
static class TestReceiver extends MessageReceiverAdapter
{
public void receiveSearch(SearchMessage searchMessage)
{
System.out.println("Search Session received: " +
searchMessage.getSearchCriteria());
}
}
I wanted to know if there is an example like this but using the phex source code. |