Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.pastry.dist
Class DistNodeHandle<Identifier>

    java.lang.Object
      java.util.Observable
          rice.p2p.commonapi.NodeHandle
              rice.pastry.NodeHandle
                  rice.pastry.socket.TransportLayerNodeHandle<Identifier>
                      rice.pastry.dist.DistNodeHandle<Identifier>

All Implemented Interfaces:
  java.io.Serializable, java.util.Observer, RawSerializable

Direct Known Subclasses:
  SocketNodeHandle

    public abstract class DistNodeHandle<Identifier>

extends TransportLayerNodeHandle<Identifier>
implements java.util.Observer

Abstract class for handles to "real" remote nodes. This class abstracts out the node handle verification which is necessary in the "real" pastry protocols, since NodeHandles are sent across the wire.

Version:
  $Id: DistNodeHandle.java 4064 2007-12-26 13:39:34Z jeffh $
Author:
  Alan Mislove
See Also:
  Serialized Form

Field Summary
`protected Id` | `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`

Constructor Summary
`DistNodeHandle(Id nodeId)` Constructor

Method Summary
`abstract boolean` | `equals(java.lang.Object obj)` Equivalence relation for nodehandles.
`abstract java.net.InetSocketAddress` | `getInetSocketAddress()`
`Id` | `getNodeId()` Gets the nodeId of this Pastry node.
`abstract int` | `hashCode()` Hash codes for node handles.
`abstract java.lang.String` | `toString()` Returns a String representation of this DistNodeHandle.

Methods inherited from class rice.pastry.socket.TransportLayerNodeHandle
`getAddress, getEpoch`

Methods inherited from class rice.pastry.NodeHandle
`addObserver, addObserver, assertLocalNode, bootstrap, checkLiveness, countObservers, deleteObserver, deleteObservers, getId, getLiveness, getLocalNode, isAlive, notifyObservers, ping, proximity, receiveMessage, serialize, 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`

Methods inherited from interface java.util.Observer
`update`

Field Detail

### nodeId

    protected Id nodeId

Constructor Detail

### DistNodeHandle

    public DistNodeHandle(Id nodeId)

  Constructor

  Parameters:
    `nodeId` - This node handle's node Id.

Method Detail

### getNodeId

    public final Id getNodeId()

  Gets the nodeId of this Pastry node.

  Specified by:
    `getNodeId` in class `NodeHandle`
  Returns:
    the node id.

### toString

    public abstract java.lang.String toString()

  Returns a String representation of this DistNodeHandle. This method is designed to be called by clients using the node handle, and is provided in order to ensure that the right node handle is being talked to.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    A String representation of the node handle.

### equals

    public abstract boolean equals(java.lang.Object obj)

  Equivalence relation for nodehandles. They are equal if and only if their corresponding NodeIds are equal.

  Specified by:
    `equals` in class `NodeHandle`
  Parameters:
    `obj` - the other nodehandle .
  Returns:
    true if they are equal, false otherwise.

### hashCode

    public abstract int hashCode()

  Hash codes for node handles. It is the hashcode of their corresponding NodeId's.

  Specified by:
    `hashCode` in class `NodeHandle`
  Returns:
    a hash code.

### getInetSocketAddress

    public abstract java.net.InetSocketAddress getInetSocketAddress()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.