Project JXTA

net.jxta.resolver
Interface QueryHandler


public interface QueryHandler

Services that wish to act as a resolver handler must implement this interface

Since:
JXTA 1.0
See Also:
Resolver, GenericResolver, Resolver, ResolverQueryMsg, Tag $Name: $

Method Summary
 ResolverResponseMsg processQuery(ResolverQueryMsg query)
          Process the resolver query, and generate response
 void pushResponse(ResolverResponseMsg response)
          call back method, when messages are received by the Resolver it calls back this method to deal with received responses
 

Method Detail

processQuery

public ResolverResponseMsg processQuery(ResolverQueryMsg query)
                                 throws NoResponseException,
                                        ResendQueryException,
                                        DiscardQueryException,
                                        java.io.IOException
Process the resolver query, and generate response
Parameters:
query - ResolverQueryMsg query
Returns:
GenericResolverMsg Response to the query
Throws:
NoResponseException - is thrown when the resolver service does not have an response and is not interested by the response.
ResendQueryException - is thrown when the resolver service does not have a response, but is interested by the response. In that case, the resolver service is responsible for forward the response to the original peer that has issued the query.
DiscardQueryException - is thrown when the resolver service has decided that the query should simply be ignored.
java.io.IOException - is thrown when the service resolver was not able to process the query
Since:
JXTA 1.0

pushResponse

public void pushResponse(ResolverResponseMsg response)
call back method, when messages are received by the Resolver it calls back this method to deal with received responses
Parameters:
response - ResolverQueryMsg reponse
Since:
JXTA 1.0

Project JXTA