Rice Pastry API

rice.pastry.socket.nat.rendezvous
Class RendezvousSocketNodeHandle

java.lang.Object
  extended by java.util.Observable
      extended by rice.p2p.commonapi.NodeHandle
          extended by org.mpisws.p2p.transport.commonapi.TransportLayerNodeHandle<Identifier>
              extended by rice.pastry.NodeHandle<Identifier>
                  extended by rice.pastry.dist.DistNodeHandle<MultiInetSocketAddress>
                      extended by rice.pastry.socket.SocketNodeHandle
                          extended by rice.pastry.socket.nat.rendezvous.RendezvousSocketNodeHandle
All Implemented Interfaces:
java.io.Serializable, java.util.Observer, RendezvousContact

public class RendezvousSocketNodeHandle
extends SocketNodeHandle
implements RendezvousContact

Maintains RendezvousInfo with the NodeHandle

Author:
Jeff Hoye
See Also:
Serialized Form

Field Summary
 
Fields inherited from class rice.pastry.socket.SocketNodeHandle
eaddress
 
Fields inherited from class rice.pastry.dist.DistNodeHandle
nodeId
 
Fields inherited from class rice.pastry.NodeHandle
LIVENESS_ALIVE, LIVENESS_DEAD, LIVENESS_SUSPECTED, localnode, logger
 
Fields inherited from class rice.p2p.commonapi.NodeHandle
DECLARED_DEAD, DECLARED_LIVE, PROXIMITY_CHANGED
 
Method Summary
 boolean canContactDirect()
           
 boolean isConnected()
          return True if isAlive() and canContactDirect() or we already have a direct connection on the third party channel.
 void serialize(OutputBuffer buf)
           
 
Methods inherited from class rice.pastry.socket.SocketNodeHandle
checkLiveness, equals, getAddress, getEpoch, getIdentifier, getInetSocketAddress, getLiveness, hashCode, isLocal, ping, proximity, receiveMessage, setLocalNode, toString, toStringFull, update
 
Methods inherited from class rice.pastry.dist.DistNodeHandle
getNodeId
 
Methods inherited from class rice.pastry.NodeHandle
addObserver, addObserver, assertLocalNode, bootstrap, countObservers, deleteObserver, deleteObservers, getId, getLocalNode, isAlive, notifyObservers, update
 
Methods inherited from class java.util.Observable
clearChanged, hasChanged, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

serialize

public void serialize(OutputBuffer buf)
               throws java.io.IOException
Overrides:
serialize in class SocketNodeHandle
Throws:
java.io.IOException

canContactDirect

public boolean canContactDirect()
Specified by:
canContactDirect in interface RendezvousContact
Returns:
true if an internet routable IP; false if NATted and no port forwarding, or other type FireWall.

isConnected

public boolean isConnected()
Description copied from interface: RendezvousContact
return True if isAlive() and canContactDirect() or we already have a direct connection on the third party channel. False otherwise. Note that this is true if we have a primary socket opened in PriorityTL

Specified by:
isConnected in interface RendezvousContact
Returns:

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection