|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
rice.p2p.commonapi.NodeHandle
rice.pastry.NodeHandle
public abstract class NodeHandle
Interface for handles to remote nodes.
| Field Summary | |
|---|---|
static int |
LIVENESS_ALIVE
|
static int |
LIVENESS_DEAD
|
static int |
LIVENESS_SUSPECTED
|
protected PastryNode |
localnode
|
protected Logger |
logger
|
| Fields inherited from class rice.p2p.commonapi.NodeHandle |
|---|
DECLARED_DEAD, DECLARED_LIVE, PROXIMITY_CHANGED |
| Constructor Summary | |
|---|---|
NodeHandle()
|
|
| Method Summary | |
|---|---|
void |
addObserver(java.util.Observer o)
|
void |
addObserver(java.util.Observer o,
int priority)
|
void |
assertLocalNode()
May be called from handle etc methods to ensure that local node has been set, either on construction or on deserialization/receivemsg. |
void |
bootstrap(Message msg)
Method which is used by Pastry to start the bootstrapping process on the local node using this handle as the bootstrap handle. |
boolean |
checkLiveness()
Method which FORCES a check of liveness of the remote node. |
int |
countObservers()
|
void |
deleteObserver(java.util.Observer o)
|
void |
deleteObservers()
|
abstract boolean |
equals(java.lang.Object obj)
Equality operator for nodehandles. |
Id |
getId()
Returns this node's id. |
abstract int |
getLiveness()
A more detailed version of isAlive(). |
PastryNode |
getLocalNode()
Accessor method. |
abstract Id |
getNodeId()
Gets the nodeId of this Pastry node. |
abstract int |
hashCode()
Hash codes for nodehandles. |
boolean |
isAlive()
Returns the last known liveness information about the Pastry node associated with this handle. |
void |
notifyObservers(java.lang.Object arg)
|
abstract boolean |
ping()
Ping the node. |
abstract int |
proximity()
Deprecated. use PastryNode.proximity() or Endpoint.proximity() |
abstract void |
receiveMessage(Message msg)
Deprecated. use PastryNode.send() or Endpoint.send() |
abstract void |
serialize(OutputBuffer buf)
|
void |
update(java.lang.Object update)
Method which allows the observers of this socket node handle to be updated. |
| Methods inherited from class java.util.Observable |
|---|
clearChanged, hasChanged, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LIVENESS_ALIVE
public static final int LIVENESS_SUSPECTED
public static final int LIVENESS_DEAD
protected transient PastryNode localnode
protected transient Logger logger
| Constructor Detail |
|---|
public NodeHandle()
| Method Detail |
|---|
public abstract Id getNodeId()
public Id getId()
NodeHandle
getId in class NodeHandlepublic final boolean isAlive()
isAlive in class NodeHandlepublic abstract int getLiveness()
public boolean checkLiveness()
checkLiveness in class NodeHandlepublic abstract int proximity()
proximity in class NodeHandlepublic abstract boolean ping()
public final PastryNode getLocalNode()
public void assertLocalNode()
public abstract boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - a nodehandle object
public void bootstrap(Message msg)
throws java.io.IOException
msg - the bootstrap message.
java.io.IOExceptionpublic abstract int hashCode()
hashCode in class java.lang.Objectpublic abstract void receiveMessage(Message msg)
msg -
public abstract void serialize(OutputBuffer buf)
throws java.io.IOException
serialize in class NodeHandlejava.io.IOExceptionpublic void addObserver(java.util.Observer o)
addObserver in class java.util.Observable
public void addObserver(java.util.Observer o,
int priority)
o - priority - higher priority observers will be called firstpublic void deleteObserver(java.util.Observer o)
deleteObserver in class java.util.Observablepublic void notifyObservers(java.lang.Object arg)
notifyObservers in class java.util.Observablepublic int countObservers()
countObservers in class java.util.Observablepublic void deleteObservers()
deleteObservers in class java.util.Observablepublic void update(java.lang.Object update)
update - The update
|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||