Rice Pastry API

org.mpisws.p2p.transport.networkinfo
Interface InetSocketAddressLookup

All Superinterfaces:
Destructable
All Known Implementing Classes:
NetworkInfoTransportLayer

public interface InetSocketAddressLookup
extends Destructable

First, call getMyInetAddress to find the external address. Second, try to use UPnP or user configured portForwarding to configure the NAT Third, call verifyConnectivity to make sure it all worked

Author:
Jeff Hoye

Method Summary
 Cancellable getExternalNodes(java.net.InetSocketAddress bootstrap, Continuation<java.util.Collection<java.net.InetSocketAddress>,java.io.IOException> c, java.util.Map<java.lang.String,java.lang.Object> options)
          find nodes outside of our firewall so I can boot
 Cancellable getMyInetAddress(java.net.InetSocketAddress bootstrap, Continuation<java.net.InetSocketAddress,java.io.IOException> c, java.util.Map<java.lang.String,java.lang.Object> options)
          Returns the local node's InetSocketAddress
 Cancellable verifyConnectivity(MultiInetSocketAddress local, java.net.InetSocketAddress probeAddresses, ConnectivityResult deliverResultToMe, java.util.Map<java.lang.String,java.lang.Object> options)
          Verify that I have connectivity by using a third party.
 
Methods inherited from interface rice.Destructable
destroy
 

Method Detail

getExternalNodes

Cancellable getExternalNodes(java.net.InetSocketAddress bootstrap,
                             Continuation<java.util.Collection<java.net.InetSocketAddress>,java.io.IOException> c,
                             java.util.Map<java.lang.String,java.lang.Object> options)
find nodes outside of our firewall so I can boot

Parameters:
target -
continuation -
options -
Returns:

getMyInetAddress

Cancellable getMyInetAddress(java.net.InetSocketAddress bootstrap,
                             Continuation<java.net.InetSocketAddress,java.io.IOException> c,
                             java.util.Map<java.lang.String,java.lang.Object> options)
Returns the local node's InetSocketAddress

Parameters:
bootstrap - who to ask
c - where the return value is delivered
options - can be null
Returns:
you can cancel the operation

verifyConnectivity

Cancellable verifyConnectivity(MultiInetSocketAddress local,
                               java.net.InetSocketAddress probeAddresses,
                               ConnectivityResult deliverResultToMe,
                               java.util.Map<java.lang.String,java.lang.Object> options)
Verify that I have connectivity by using a third party. Opens a socket to probeAddress. probeAddress calls ProbeStrategy.requestProbe() probeStrategy forwards the request to another node "Carol" Carol probes local

Parameters:
bootstrap -
proxyAddr -
Returns:

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection