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, ResolverQueryMsg, ResolverResponseMsg

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

result = processIncomingQuery(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

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

 result = processIncomingQuery(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

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 response

JXSE