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
Interface LocalNodeI

All Superinterfaces:
  java.io.Serializable

All Known Implementing Classes:
  LocalNode, NodeHandle

public interface LocalNodeI
extends java.io.Serializable

Interface that some Serializable classes (such as NodeHandle and Certificate) implement, if they want to be kept informed of what node they're on. Think of this as a pattern. One implementation of this is provided (LocalNodeImpl), but if a class cannot use this implementation (for reasons such as multiple inheritance), it should implement LocalNode and provide the methods below. NOTE: All implementations of local nodes should override their readObject() methods in order to add the following lines: in.defaultReadObject(); LocalNode.pending.addPending(in, this) which will schedule the LocalNode to have it's local node to be set to non-null.

Version:
  $Id: LocalNodeI.java,v 1.3 2005/03/14 21:33:08 jeffh Exp $
Author:
  Alan Mislove

Field Summary
`static PendingLocalNodesList` | `pending` Refer to README.handles_localnode.

Method Summary
`void` | `assertLocalNode()` May be called from handle etc methods to ensure that local node has been set, either on construction or on deserialization/receivemsg.
`PastryNode` | `getLocalNode()` Accessor method.
`void` | `setLocalNode(PastryNode pn)` Accessor method.

Field Detail

### pending

    public static final PendingLocalNodesList pending

  Refer to README.handles_localnode.

Method Detail

### getLocalNode

    public PastryNode getLocalNode()

  Accessor method.

  Returns:
    The LocalNode value

### setLocalNode

    public void setLocalNode(PastryNode pn)

  Accessor method. Notifies the overridable afterSetLocalNode.

  Parameters:
    `pn` - The new LocalNode value

### assertLocalNode

    public void assertLocalNode()

  May be called from handle etc methods to ensure that local node has been set, either on construction or on deserialization/receivemsg.

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.