|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--rice.p2p.commonapi.NodeHandle | +--rice.pastry.NodeHandle | +--rice.pastry.dist.DistNodeHandle | +--rice.pastry.rmi.RMINodeHandle
A locally stored node handle that points to a remote RMIRemoteNodeI. Need localnode within handle for three reasons: to determine isLocal (thus alive and proximity() = 0), to set senderId in messages (used for coalescing on the other end), and to bounce messages back to self on failure.
Field Summary | |
int |
id
|
static int |
index
|
Fields inherited from class rice.pastry.dist.DistNodeHandle |
address, alive, DEFAULT_DISTANCE, isInPool, isLocal, nodeId |
Fields inherited from class rice.pastry.NodeHandle |
localnode |
Fields inherited from class rice.p2p.commonapi.NodeHandle |
DECLARED_DEAD, DECLARED_LIVE, PROXIMITY_CHANGED |
Fields inherited from interface rice.pastry.LocalNodeI |
pending |
Constructor Summary | |
RMINodeHandle(rice.pastry.rmi.RMIRemoteNodeI rn,
rice.pastry.NodeId nid,
java.net.InetSocketAddress address)
Constructor. |
|
RMINodeHandle(rice.pastry.rmi.RMIRemoteNodeI rn,
rice.pastry.NodeId nid,
rice.pastry.PastryNode pn,
java.net.InetSocketAddress address)
Alternate constructor with local Pastry node. |
Method Summary | |
void |
doPing()
Do the (blocking) ping |
void |
doSend(rice.pastry.messaging.Message msg)
Do the actual (blocking) RMI call to the remote node |
rice.pastry.rmi.RMIRemoteNodeI |
getRemote()
Remotenode accessor method. |
boolean |
pingImpl()
Ping the remote node now, and update the proximity metric. |
void |
receiveMessageImpl(rice.pastry.messaging.Message msg)
Called to send a message to the node corresponding to this handle. |
void |
setRemoteNode(rice.pastry.rmi.RMIRemoteNodeI rn)
Remotenode accessor method. |
java.lang.String |
toStringImpl()
Returns a String representation of this DistNodeHandle. |
Methods inherited from class rice.pastry.dist.DistNodeHandle |
addObserver, afterSetLocalNode, clearChanged, countObservers, debug, deleteObserver, deleteObservers, equals, getAddress, getIsInPool, getNodeId, hasChanged, hashCode, isAlive, markAlive, markDead, notifyObservers, notifyObservers, ping, proximity, receiveMessage, setChanged, setIsInPool, setProximity, toString, update |
Methods inherited from class rice.pastry.NodeHandle |
assertLocalNode, getId, getLocalNode, setLocalNode |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static transient int index
public transient int id
Constructor Detail |
public RMINodeHandle(rice.pastry.rmi.RMIRemoteNodeI rn, rice.pastry.NodeId nid, java.net.InetSocketAddress address)
rn
- pastry node for whom we're constructing a handle.nid
- its node id.public RMINodeHandle(rice.pastry.rmi.RMIRemoteNodeI rn, rice.pastry.NodeId nid, rice.pastry.PastryNode pn, java.net.InetSocketAddress address)
rn
- pastry node for whom we're constructing a handle.nid
- its node id.pn
- local Pastry node.Method Detail |
public rice.pastry.rmi.RMIRemoteNodeI getRemote()
public void setRemoteNode(rice.pastry.rmi.RMIRemoteNodeI rn)
rn
- RMI remote reference to some Pastry node.public void receiveMessageImpl(rice.pastry.messaging.Message msg)
receiveMessageImpl
in class DistNodeHandle
msg
- Message to be delivered, may or may not be routeMessage.public void doSend(rice.pastry.messaging.Message msg)
msg
- Message to be delivered, may or may not be routeMessage.public boolean pingImpl()
pingImpl
in class DistNodeHandle
public void doPing()
public java.lang.String toStringImpl()
DistNodeHandle
toStringImpl
in class DistNodeHandle
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |