Project JXTA

net.jxta.resolver
Interface QueryHandler


public interface QueryHandler

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

See Also:
ResolverService, GenericResolver, ResolverQueryMsg

Method Summary
 int processQuery(ResolverQueryMsg query)
          Process the resolver query, and generate response it is the responsibilty of the handler to send the response

result = processIncommingQuery(query); if (result !

 void processResponse(ResolverResponseMsg response)
          Called when messages are received by the ResolverService it calls back this method to deal with received responses
 

Method Detail

processQuery

public int processQuery(ResolverQueryMsg query)
Process the resolver query, and generate response it is the responsibilty of the handler to send the response

 result = processIncommingQuery(query);
 if (result != null) {
   resolver.sendResponse(query.getSrc(), response);
   return ResolverService.OK;
  } else return ResolverService.Repropagate;
 

Parameters:
query - ResolverQueryMsg query
Returns:
int status, OK success, Repropagate to indicate a re-propagation is needed

processResponse

public void processResponse(ResolverResponseMsg response)
Called when messages are received by the ResolverService it calls back this method to deal with received responses

Parameters:
response - ResolverQueryMsg reponse

JXTA J2SE