net.jxta.search.peer
Class JxtaRouterClient

java.lang.Object
  |
  +--net.jxta.search.peer.JxtaRouterClient

public class JxtaRouterClient
extends java.lang.Object

A Jxta implementation of a RouterClient. Instances are reentrant.


Constructor Summary
JxtaRouterClient(net.jxta.peergroup.PeerGroup group, net.jxta.protocol.PipeAdvertisement routerPipeAdv, javax.xml.parsers.DocumentBuilder builder)
          Standard constructor for creating JxtaRouterClient instances.
 
Method Summary
static java.util.Enumeration discoverRouterPipeAdvs(net.jxta.peergroup.PeerGroup group)
          Returns an enumeration of pipe advertisement for advertised jxtasearch routers
 org.w3c.dom.Document search(Request request)
          Issues a synchronous search request and returns the Document with the response.
 java.lang.String search(Request request, QueryResponseCallback callback)
          Issues an asynchronous search requests and returns the UUID for the request.
 void setRouterPipeAdv(net.jxta.protocol.PipeAdvertisement pipeAdv)
          Allows the user to change the router pipe advertisement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JxtaRouterClient

public JxtaRouterClient(net.jxta.peergroup.PeerGroup group,
                        net.jxta.protocol.PipeAdvertisement routerPipeAdv,
                        javax.xml.parsers.DocumentBuilder builder)
                 throws java.io.IOException
Standard constructor for creating JxtaRouterClient instances. Instances are reentrant.
Method Detail

discoverRouterPipeAdvs

public static java.util.Enumeration discoverRouterPipeAdvs(net.jxta.peergroup.PeerGroup group)
                                                    throws net.jxta.exception.PeerGroupException
Returns an enumeration of pipe advertisement for advertised jxtasearch routers

setRouterPipeAdv

public void setRouterPipeAdv(net.jxta.protocol.PipeAdvertisement pipeAdv)
                      throws java.io.IOException
Allows the user to change the router pipe advertisement

search

public java.lang.String search(Request request,
                               QueryResponseCallback callback)
                        throws java.io.IOException
Issues an asynchronous search requests and returns the UUID for the request. callback will be called when the response has arrived

search

public org.w3c.dom.Document search(Request request)
                            throws java.io.IOException
Issues a synchronous search request and returns the Document with the response. This is a convenience method implemented on top of the other search method