Rice Pastry API

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.1 2002/08/13 18:09:54 amislove Exp $
Author:
Alan Mislove

Field Summary
static rice.pastry.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.
 rice.pastry.PastryNode getLocalNode()
          Accessor method.
 void setLocalNode(rice.pastry.PastryNode pn)
          Accessor method.
 

Field Detail

pending

public static final rice.pastry.PendingLocalNodesList pending
Refer to README.handles_localnode.

Method Detail

getLocalNode

public rice.pastry.PastryNode getLocalNode()
Accessor method.


setLocalNode

public void setLocalNode(rice.pastry.PastryNode pn)
Accessor method. Notifies the overridable afterSetLocalNode.


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.


Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection