|
${header} | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmeteor.dht.can.MessageHandler
This class is responsible of handling messages between peers It implements the QueryHandler class for processQuery and processResponse methods.
| Field Summary | |
static boolean |
QUEUEING
|
| Constructor Summary | |
MessageHandler(CANServiceImpl l)
|
|
| Method Summary | |
Zone |
deserialize(java.lang.String sz)
Deserialize a Zone object |
int |
getNextQID()
Generates a query ID for the resolver service |
int |
processQuery(net.jxta.protocol.ResolverQueryMsg query)
Implementing QueryHandler Resolves the queries between peers to find successor or predecessor nodes, or simply notifying a node through the Notification protocol |
void |
processResponse(net.jxta.protocol.ResolverResponseMsg response)
Process a Resolver response message. |
int |
sendQuery(java.lang.String destination,
QueryMessage queryMsg)
Send a query to a specific peer, by building a QueryMessage and using the resolver service to actually send the message |
java.lang.String |
serialize(Zone z)
Serialize a Zone object |
void |
setNeighbourTable(NeighbourTable n)
Setting a pointer to the neighbour table instantiated in the DHTServiceImpl when it has received an overlay ID |
void |
setResolver(net.jxta.resolver.ResolverService r)
DHTservice implementation registers a handler for the resolver being this MessageHandler, it then points MessageHandler to that new resolver. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean QUEUEING
| Constructor Detail |
public MessageHandler(CANServiceImpl l)
l - is the DHTServiceImplementation associated to this MessageHandler| Method Detail |
public void setResolver(net.jxta.resolver.ResolverService r)
public int sendQuery(java.lang.String destination,
QueryMessage queryMsg)
public int getNextQID()
public void setNeighbourTable(NeighbourTable n)
public int processQuery(net.jxta.protocol.ResolverQueryMsg query)
processQuery in interface net.jxta.resolver.QueryHandlerpublic void processResponse(net.jxta.protocol.ResolverResponseMsg response)
processResponse in interface net.jxta.resolver.QueryHandlerresponse - a response message to be processed.public java.lang.String serialize(Zone z)
public Zone deserialize(java.lang.String sz)
|
${header} | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||