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.p2p.multiring
Class MultiringNodeHandle

    java.lang.Object
      java.util.Observable
          rice.p2p.commonapi.NodeHandle
              rice.p2p.multiring.MultiringNodeHandle

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

public class MultiringNodeHandle
extends NodeHandle
implements java.util.Observer

Version:
  $Id: pretty.settings 2305 2005-03-11 20:22:33Z jeffh $
Author:
  Alan Mislove
See Also:
  Serialized Form

Field Summary
`protected NodeHandle` | `handle` The internal handle
`protected Id` | `ringId` The handle's ringId

Fields inherited from class rice.p2p.commonapi.NodeHandle
`DECLARED_DEAD, DECLARED_LIVE, PROXIMITY_CHANGED`

Constructor Summary
`MultiringNodeHandle(Id ringId, NodeHandle handle)` Constructor

Method Summary
`boolean` | `checkLiveness()` Requests that the underlying transport layer check to ensure that the remote node is live.
`boolean` | `equals(java.lang.Object o)` Returns whether or not this object is equal to the provided one
`protected NodeHandle` | `getHandle()` Returns the internal handle
`Id` | `getId()` Returns this node's id.
`Id` | `getRingId()` Returns the ringId of this node handle
`int` | `hashCode()` Returns the hashCode
`boolean` | `isAlive()` Returns whether or not this node is currently alive
`int` | `proximity()` Returns the current proximity value of this node
`java.lang.String` | `toString()` Prints out the string
`void` | `update(java.util.Observable o, java.lang.Object obj)` Observable callback.

Methods inherited from class java.util.Observable
`addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### handle

    protected NodeHandle handle

  The internal handle

### ringId

    protected Id ringId

  The handle's ringId

Constructor Detail

### MultiringNodeHandle

    public MultiringNodeHandle(Id ringId,
                               NodeHandle handle)

  Constructor

Parameters:
  `handle` - The handle to wrap
  `ringId` - The handle's ringId

Method Detail

### getHandle

    protected NodeHandle getHandle()

  Returns the internal handle

  Returns:
    The internal handle

### getRingId

    public Id getRingId()

  Returns the ringId of this node handle

  Returns:
    This node's ringId

### getId

    public Id getId()

  Returns this node's id.

  Specified by:
    `getId` in class `NodeHandle`
  Returns:
    The corresponding node's id.

### isAlive

    public boolean isAlive()

  Returns whether or not this node is currently alive

  Specified by:
    `isAlive` in class `NodeHandle`
  Returns:
    Whether or not this node is currently alive

### proximity

    public int proximity()

  Returns the current proximity value of this node

  Specified by:
    `proximity` in class `NodeHandle`
  Returns:
    The current proximity value of this node

### update

    public void update(java.util.Observable o,
                       java.lang.Object obj)

  Observable callback. Simply rebroadcasts

  Specified by:
    `update` in interface `java.util.Observer`
  Parameters:
    `o` - the updated object
    `obj` - The paramter

### toString

    public java.lang.String toString()

  Prints out the string

  Returns:
    A string

### equals

    public boolean equals(java.lang.Object o)

  Returns whether or not this object is equal to the provided one

  Parameters:
    `o` - The object to compare to
  Returns:
    Whether or not this is object is equal

### hashCode

    public int hashCode()

  Returns the hashCode

  Returns:
    hashCode

### checkLiveness

    public boolean checkLiveness()

  Requests that the underlying transport layer check to ensure that the remote node is live. If the node is found to be live, nothing happens, but if the node does not respond, the transport layer make take steps to verfify that the node is dead. Such steps could include finding an alteranate route to the node.

  Specified by:
    `checkLiveness` in class `NodeHandle`
  Returns:
    Whether or not the node is currently alive

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.