ca.mcgill.cs.postina.scribe
Class ScribeID

java.lang.Object
  extended by ca.mcgill.cs.postina.scribe.ScribeID
All Implemented Interfaces:
PostinaID, java.io.Serializable

public class ScribeID
extends java.lang.Object
implements PostinaID

The concrete implementation of PostinaID that is used internally by Postina.

Version:
Oct 23, 2007
Author:
Dominik Zindel
See Also:
Serialized Form

Field Summary
private  rice.p2p.commonapi.NodeHandle pastryNodeHandle
          The NodeHandle defined by Pastry uniquely identifies a node in the P2P-network.
private static long serialVersionUID
           
 
Constructor Summary
protected ScribeID(rice.p2p.commonapi.NodeHandle handle)
          The constructor accepting a NodeHandle (identifying the node) is protected as applications using Postina are not allowed to create IDs.
 
Method Summary
 boolean equals(java.lang.Object o)
           
protected  rice.p2p.commonapi.NodeHandle getPastryNodeHandle()
          Gets the NodeHandle identifying the node of Pastry in the P2P-network.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

pastryNodeHandle

private final rice.p2p.commonapi.NodeHandle pastryNodeHandle
The NodeHandle defined by Pastry uniquely identifies a node in the P2P-network.

Constructor Detail

ScribeID

protected ScribeID(rice.p2p.commonapi.NodeHandle handle)
The constructor accepting a NodeHandle (identifying the node) is protected as applications using Postina are not allowed to create IDs.

Parameters:
handle - The NodeHandle pointing to the node in the P2P-network.
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getPastryNodeHandle

protected rice.p2p.commonapi.NodeHandle getPastryNodeHandle()
Gets the NodeHandle identifying the node of Pastry in the P2P-network. The NodeHandle has to be invisible for users of Postina, thus this getter is protected.

Returns:
The NodeHandle pointing to the node in the P2P-network.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object