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.4 2005/06/07 22:02:13 jeffh Exp $
Author:
  Alan Mislove

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.

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.