Rice Pastry API

rice.pastry.socket.nat.connectivityverifiier
Class ConnectivityVerifierImpl

java.lang.Object
  extended by rice.pastry.socket.nat.connectivityverifiier.ConnectivityVerifierImpl
All Implemented Interfaces:
ConnectivityVerifier

public class ConnectivityVerifierImpl
extends java.lang.Object
implements ConnectivityVerifier


Constructor Summary
ConnectivityVerifierImpl(SocketPastryNodeFactory spnf)
           
 
Method Summary
 Cancellable findExternalAddress(java.net.InetSocketAddress local, java.util.Collection<java.net.InetSocketAddress> probeAddresses, Continuation<java.net.InetAddress,java.io.IOException> deliverResultToMe)
          Call this to determine your external address.
 void findExternalAddressHelper(InetSocketAddressLookup lookup, AttachableCancellable ret, java.net.InetSocketAddress local, java.util.List<java.net.InetSocketAddress> probeList, Continuation<java.net.InetAddress,java.io.IOException> deliverResultToMe)
          Called recursively.
 Cancellable findExternalNodes(java.net.InetSocketAddress local, java.util.Collection<java.net.InetSocketAddress> probeAddresses, Continuation<java.util.Collection<java.net.InetSocketAddress>,java.io.IOException> deliverResultToMe)
          Call this to find some nodes outside your firewall.
 void findExternalNodesHelper(InetSocketAddressLookup lookup, AttachableCancellable ret, java.net.InetSocketAddress local, java.util.List<java.net.InetSocketAddress> probeList, Continuation<java.util.Collection<java.net.InetSocketAddress>,java.io.IOException> deliverResultToMe)
          Called recursively.
protected  Cancellable getInetSocketAddressLookup(java.net.InetSocketAddress bindAddress, Continuation<InetSocketAddressLookup,java.io.IOException> deliverResultToMe)
          Get the address from the transport layer.
 Cancellable verifyConnectivity(MultiInetSocketAddress local, java.util.Collection<java.net.InetSocketAddress> probeAddresses, ConnectivityResult deliverResultToMe)
          Call this to determine if your connectivity is good.
 void verifyConnectivityHelper(InetSocketAddressLookup lookup, AttachableCancellable ret, MultiInetSocketAddress local, java.util.List<java.net.InetSocketAddress> probeList, ConnectivityResult deliverResultToMe)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectivityVerifierImpl

public ConnectivityVerifierImpl(SocketPastryNodeFactory spnf)
Method Detail

getInetSocketAddressLookup

protected Cancellable getInetSocketAddressLookup(java.net.InetSocketAddress bindAddress,
                                                 Continuation<InetSocketAddressLookup,java.io.IOException> deliverResultToMe)
Get the address from the transport layer. Used by the two public methods. Does the execution on the selector, calls back on the continuation on the selector.


findExternalNodes

public Cancellable findExternalNodes(java.net.InetSocketAddress local,
                                     java.util.Collection<java.net.InetSocketAddress> probeAddresses,
                                     Continuation<java.util.Collection<java.net.InetSocketAddress>,java.io.IOException> deliverResultToMe)
Call this to find some nodes outside your firewall.

Specified by:
findExternalNodes in interface ConnectivityVerifier
Parameters:
local - the local bindaddress
probeAddresses - the nodes ask
deliverResultToMe - deliver the result here
Returns:
cancel the operation

findExternalNodesHelper

public void findExternalNodesHelper(InetSocketAddressLookup lookup,
                                    AttachableCancellable ret,
                                    java.net.InetSocketAddress local,
                                    java.util.List<java.net.InetSocketAddress> probeList,
                                    Continuation<java.util.Collection<java.net.InetSocketAddress>,java.io.IOException> deliverResultToMe)
Called recursively.

Parameters:
lookup -
ret -
local -
probeList -
deliverResultToMe -

findExternalAddress

public Cancellable findExternalAddress(java.net.InetSocketAddress local,
                                       java.util.Collection<java.net.InetSocketAddress> probeAddresses,
                                       Continuation<java.net.InetAddress,java.io.IOException> deliverResultToMe)
Call this to determine your external address.

Specified by:
findExternalAddress in interface ConnectivityVerifier
Parameters:
local - the local bindaddress
probeAddresses - the nodes ask
deliverResultToMe - deliver the result here
Returns:
cancel the operation

findExternalAddressHelper

public void findExternalAddressHelper(InetSocketAddressLookup lookup,
                                      AttachableCancellable ret,
                                      java.net.InetSocketAddress local,
                                      java.util.List<java.net.InetSocketAddress> probeList,
                                      Continuation<java.net.InetAddress,java.io.IOException> deliverResultToMe)
Called recursively.

Parameters:
lookup -
ret -
local -
probeList -
deliverResultToMe -

verifyConnectivity

public Cancellable verifyConnectivity(MultiInetSocketAddress local,
                                      java.util.Collection<java.net.InetSocketAddress> probeAddresses,
                                      ConnectivityResult deliverResultToMe)
Call this to determine if your connectivity is good.

Specified by:
verifyConnectivity in interface ConnectivityVerifier
Returns:
cancel the operation

verifyConnectivityHelper

public void verifyConnectivityHelper(InetSocketAddressLookup lookup,
                                     AttachableCancellable ret,
                                     MultiInetSocketAddress local,
                                     java.util.List<java.net.InetSocketAddress> probeList,
                                     ConnectivityResult deliverResultToMe)

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection