com.aelitis.azureus.core.nat
Class NATTraverser

java.lang.Object
  extended by com.aelitis.azureus.core.nat.NATTraverser
All Implemented Interfaces:
DHTNATPuncherAdapter

public class NATTraverser
extends Object
implements DHTNATPuncherAdapter


Field Summary
static int TRAVERSE_REASON_GENERIC_MESSAGING
           
static int TRAVERSE_REASON_PAIR_TUNNEL
           
static int TRAVERSE_REASON_PEER_DATA
           
 
Constructor Summary
NATTraverser(AzureusCore _core)
           
 
Method Summary
 NATTraversal attemptTraversal(NATTraversalHandler handler, InetSocketAddress target, Map request, boolean sync, NATTraversalObserver listener)
           
 Map getClientData(InetSocketAddress originator, Map originator_data)
           
 void registerHandler(NATTraversalHandler handler)
           
 Map sendMessage(NATTraversalHandler handler, InetSocketAddress rendezvous, InetSocketAddress target, Map message)
           
protected  void syncTraverse(NATTraversalHandler handler, InetSocketAddress target, Map request, NATTraversalObserver listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRAVERSE_REASON_PEER_DATA

public static final int TRAVERSE_REASON_PEER_DATA
See Also:
Constant Field Values

TRAVERSE_REASON_GENERIC_MESSAGING

public static final int TRAVERSE_REASON_GENERIC_MESSAGING
See Also:
Constant Field Values

TRAVERSE_REASON_PAIR_TUNNEL

public static final int TRAVERSE_REASON_PAIR_TUNNEL
See Also:
Constant Field Values
Constructor Detail

NATTraverser

public NATTraverser(AzureusCore _core)
Method Detail

registerHandler

public void registerHandler(NATTraversalHandler handler)

attemptTraversal

public NATTraversal attemptTraversal(NATTraversalHandler handler,
                                     InetSocketAddress target,
                                     Map request,
                                     boolean sync,
                                     NATTraversalObserver listener)

syncTraverse

protected void syncTraverse(NATTraversalHandler handler,
                            InetSocketAddress target,
                            Map request,
                            NATTraversalObserver listener)

sendMessage

public Map sendMessage(NATTraversalHandler handler,
                       InetSocketAddress rendezvous,
                       InetSocketAddress target,
                       Map message)
                throws NATTraversalException
Throws:
NATTraversalException

getClientData

public Map getClientData(InetSocketAddress originator,
                         Map originator_data)
Specified by:
getClientData in interface DHTNATPuncherAdapter