net.jxta.search.peer
Class JxtaInfoProviderService

java.lang.Object
  |
  +--net.jxta.search.peer.JxtaInfoProviderService
All Implemented Interfaces:
java.lang.Runnable

public class JxtaInfoProviderService
extends java.lang.Object
implements java.lang.Runnable

Service class that provides everything you need to become a JXTA information provider. See net.jxta.search.examples.jxtaprovider for an example of how to use this class.


Constructor Summary
JxtaInfoProviderService(net.jxta.peergroup.PeerGroup peerGroup, javax.xml.parsers.DocumentBuilder builder, RequestHandler requestHandler)
           
 
Method Summary
 void registerWithHubs()
          Registers with any jxtasearch hubs we can discover
 void run()
          the main loop of the info provider.
 void stop()
           
 void unregisterWithHubs()
          unregisters with any hubs that we are registered with.
 void unregisterWithHubs(java.lang.Object condition)
          Same as unregister with hubs, except that condition is notified when the unregistration is complete.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JxtaInfoProviderService

public JxtaInfoProviderService(net.jxta.peergroup.PeerGroup peerGroup,
                               javax.xml.parsers.DocumentBuilder builder,
                               RequestHandler requestHandler)
                        throws net.jxta.exception.JxtaException,
                               java.io.IOException
Method Detail

run

public void run()
the main loop of the info provider. This simple waits for a message and processes it
Specified by:
run in interface java.lang.Runnable

stop

public void stop()

registerWithHubs

public void registerWithHubs()
Registers with any jxtasearch hubs we can discover

unregisterWithHubs

public void unregisterWithHubs(java.lang.Object condition)
Same as unregister with hubs, except that condition is notified when the unregistration is complete. nice to coding a graceful shutdown.

unregisterWithHubs

public void unregisterWithHubs()
unregisters with any hubs that we are registered with.