|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InternalQueryHandler
Services that wish to act as a resolver handler must implement this interface.
This interface extends the normal resolver query handler interface to add the source of the query. Typically this the query's last hop which may or may not be the same as the query's originator. Knowing the source of the query can be useful for sending NAK messages.
ResolverService
,
ResolverQueryMsg
Method Summary | |
---|---|
int |
processQuery(ResolverQueryMsg query,
EndpointAddress srcAddr)
Process the resolver query, and generate response it is the responsibility of the handler to send the response result = processIncommingQuery(query); if (result ! |
void |
processResponse(ResolverResponseMsg response,
EndpointAddress srcAddr)
Called when messages are received by the ResolverService it calls back this method to deal with received responses |
Methods inherited from interface net.jxta.resolver.QueryHandler |
---|
processQuery, processResponse |
Method Detail |
---|
int processQuery(ResolverQueryMsg query, EndpointAddress srcAddr)
result = processIncommingQuery(query); if (result != null) { resolver.sendResponse(query.getSrc(), response); return resolver.OK; } else return resolver.Repropagate;
srcAddr
- source addressquery
- ResolverQueryMsg query
OK
success,
Repropagate
to
indicate a re-propagation is neededvoid processResponse(ResolverResponseMsg response, EndpointAddress srcAddr)
response
- ResolverQueryMsg responsesrcAddr
- source address
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |