Rice Pastry API

rice.pastry.socket.nat.probe
Class ProbeApp

java.lang.Object
  extended by rice.pastry.client.PastryAppl
      extended by rice.pastry.socket.nat.probe.ProbeApp
All Implemented Interfaces:
ProbeStrategy

public class ProbeApp
extends PastryAppl
implements ProbeStrategy


Field Summary
 
Fields inherited from class rice.pastry.client.PastryAppl
address, deserializer, instance, logger, options, receiver, thePastryNode
 
Constructor Summary
ProbeApp(PastryNode pn, Prober prober, AddressStrategy addressStrategy)
           
 
Method Summary
 java.util.Collection<java.net.InetSocketAddress> getExternalAddresses()
          Returns some known external addresses.
 void handleProbeRequestMessage(ProbeRequestMessage prm)
           
 void messageForAppl(Message msg)
          Called by pastry when a message arrives for this application.
 Cancellable requestProbe(MultiInetSocketAddress addr, long uid, Continuation<java.lang.Boolean,java.lang.Exception> deliverResultToMe)
          Send a ProbeRequestMessage to a node in the leafset.
 
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
 

Constructor Detail

ProbeApp

public ProbeApp(PastryNode pn,
                Prober prober,
                AddressStrategy addressStrategy)
Method Detail

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:

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection