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 java.lang.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, java.net.InetSocketAddress target, java.util.Map request, boolean sync, NATTraversalObserver listener)
           
 java.util.Map getClientData(java.net.InetSocketAddress originator, java.util.Map originator_data)
           
 void registerHandler(NATTraversalHandler handler)
           
 java.util.Map sendMessage(NATTraversalHandler handler, java.net.InetSocketAddress rendezvous, java.net.InetSocketAddress target, java.util.Map message)
           
protected  void syncTraverse(NATTraversalHandler handler, java.net.InetSocketAddress target, java.util.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,
                                     java.net.InetSocketAddress target,
                                     java.util.Map request,
                                     boolean sync,
                                     NATTraversalObserver listener)

syncTraverse

protected void syncTraverse(NATTraversalHandler handler,
                            java.net.InetSocketAddress target,
                            java.util.Map request,
                            NATTraversalObserver listener)

sendMessage

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

getClientData

public java.util.Map getClientData(java.net.InetSocketAddress originator,
                                   java.util.Map originator_data)
Specified by:
getClientData in interface DHTNATPuncherAdapter