rice.pastry.socket.nat.probe
Class ProbeApp
java.lang.Object
rice.pastry.client.PastryAppl
rice.pastry.socket.nat.probe.ProbeApp
- All Implemented Interfaces:
- ProbeStrategy
public class ProbeApp
- extends PastryAppl
- implements ProbeStrategy
Methods inherited from class rice.pastry.client.PastryAppl |
accept, canReceiveSocket, connect, deliverWhenNotReady, destroy, enrouteMessage, finishReceiveSocket, getAddress, getDeserializer, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, receiveMessage, receiveMessageInternal, register, routeMsg, routeMsg, routeMsgDirect, routeSetChange, setDeserializer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProbeApp
public ProbeApp(PastryNode pn,
Prober prober,
AddressStrategy addressStrategy)
messageForAppl
public void messageForAppl(Message msg)
- Description copied from class:
PastryAppl
- Called by pastry when a message arrives for this application.
- Specified by:
messageForAppl
in class PastryAppl
- Parameters:
msg
- the message that is arriving.
handleProbeRequestMessage
public void handleProbeRequestMessage(ProbeRequestMessage prm)
requestProbe
public Cancellable requestProbe(MultiInetSocketAddress addr,
long uid,
Continuation<java.lang.Boolean,java.lang.Exception> deliverResultToMe)
- Send a ProbeRequestMessage to a node in the leafset.
The node must not have the same external address as addr.
If no such candidate can be found, use someone who does.
If there are no candidates at all, send the message to self (or call handleProbeRequest()
- Specified by:
requestProbe
in interface ProbeStrategy
- Parameters:
addr
- the location of the requestor (who we need to probe)uid
- a unique identifier created by the original requestor at addr
- Returns:
- can cancel the operation
getExternalAddresses
public java.util.Collection<java.net.InetSocketAddress> getExternalAddresses()
- Description copied from interface:
ProbeStrategy
- Returns some known external addresses.
- Specified by:
getExternalAddresses
in interface ProbeStrategy
- Returns:
Copyright © 2001-2005 - Rice Pastry.