|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rice.pastry.client.PastryAppl | +--rice.scribe.testing.DistScribeRegrTestApp
Field Summary | |
protected static rice.pastry.messaging.Address |
m_address
The receiver address for the DistScribeApp system. |
static int |
m_appCount
|
int |
m_appIndex
|
protected static rice.pastry.security.Credentials |
m_credentials
The Credentials object to be used for all messaging through Pastry |
rice.scribe.testing.DistScribeRegrTest |
m_driver
|
java.util.Hashtable |
m_logTable
The hashtable maintaining mapping from topicId to log object maintained by this application for that topic. |
protected rice.pastry.PastryNode |
m_pastryNode
|
java.util.Random |
m_rng
|
rice.scribe.Scribe |
m_scribe
|
protected rice.pastry.routing.SendOptions |
m_sendOptions
The SendOptions object to be used for all messaging through Pastry |
java.util.Vector |
m_topics
|
Fields inherited from class rice.pastry.client.PastryAppl |
address, instance, thePastryNode |
Constructor Summary | |
DistScribeRegrTestApp(rice.pastry.PastryNode pn,
rice.scribe.Scribe scribe,
rice.pastry.security.Credentials cred,
rice.scribe.testing.DistScribeRegrTest driver)
|
Method Summary | |
void |
anycast(rice.pastry.NodeId topicId,
java.io.Serializable data)
direct call to scribe for anycasting to a topic from the current node. |
boolean |
anycastHandler(rice.scribe.messaging.ScribeMessage msg)
up-call invoked by Scribe when an anycast message is being handled. |
void |
create(rice.pastry.NodeId topicId)
direct call to scribe for creating a topic from the current node. |
void |
faultHandler(rice.scribe.messaging.ScribeMessage msg,
rice.pastry.NodeHandle parent)
up-call invoked by scribe when a node detects a failure from its parent. |
void |
forwardHandler(rice.scribe.messaging.ScribeMessage msg)
up-call invoked by scribe when a publish message is forwarded through the multicast tree. |
rice.pastry.messaging.Address |
getAddress()
Returns the address of this application. |
rice.pastry.security.Credentials |
getCredentials()
Returns the credentials of this application. |
rice.scribe.Scribe |
getScribe()
|
void |
isNewRoot(rice.pastry.NodeId topicId)
Upcall by scribe to let this application know that it is the new root. |
void |
join(rice.pastry.NodeId topicId)
direct call to scribe for subscribing to a topic from the current node. |
void |
leave(rice.pastry.NodeId topicId)
direct call to scribe for unsubscribing a topic from the current node The topic is chosen randomly if null is passed and topics exist. |
void |
messageForAppl(rice.pastry.messaging.Message msg)
Called by pastry when a message arrives for this application. |
void |
multicast(rice.pastry.NodeId topicId,
java.io.Serializable data)
direct call to scribe for publishing to a topic from the current node. |
void |
newParent(rice.pastry.NodeId topicId,
rice.pastry.NodeHandle newParent,
java.io.Serializable data)
Upcall by scribe to let this application know about local node's new parent in the topic tree |
void |
processLog(rice.pastry.NodeId topicId,
int new_seqno)
|
void |
receiveMessage(rice.scribe.messaging.ScribeMessage msg)
up-call invoked by scribe when a publish message is 'delivered'. |
void |
scribeIsReady()
Invoked when the underlying Scribe substrate is ready. |
void |
subscribeHandler(rice.pastry.NodeId topicId,
rice.pastry.NodeHandle child,
boolean wasAdded,
java.io.Serializable obj)
up-call invoked by scribe when a node is added/removed to the multicast tree. |
Methods inherited from class rice.pastry.client.PastryAppl |
enrouteMessage, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, receiveMessage, registerReceiver, routeMsg, routeMsgDirect, routeSetChange, sendMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected rice.pastry.PastryNode m_pastryNode
public rice.scribe.Scribe m_scribe
public int m_appIndex
public static int m_appCount
public java.util.Random m_rng
public java.util.Hashtable m_logTable
protected static rice.pastry.messaging.Address m_address
protected rice.pastry.routing.SendOptions m_sendOptions
protected static rice.pastry.security.Credentials m_credentials
public java.util.Vector m_topics
public rice.scribe.testing.DistScribeRegrTest m_driver
Constructor Detail |
public DistScribeRegrTestApp(rice.pastry.PastryNode pn, rice.scribe.Scribe scribe, rice.pastry.security.Credentials cred, rice.scribe.testing.DistScribeRegrTest driver)
Method Detail |
public void scribeIsReady()
IScribeApp
scribeIsReady
in interface IScribeApp
public rice.scribe.Scribe getScribe()
public void receiveMessage(rice.scribe.messaging.ScribeMessage msg)
receiveMessage
in interface IScribeApp
msg
- The message sent in the PUBLISH message.public void processLog(rice.pastry.NodeId topicId, int new_seqno)
public void forwardHandler(rice.scribe.messaging.ScribeMessage msg)
forwardHandler
in interface IScribeApp
msg
- The message about to be forwarded.public void faultHandler(rice.scribe.messaging.ScribeMessage msg, rice.pastry.NodeHandle parent)
faultHandler
in interface IScribeApp
msg
- The SUBSCRIBE message that is sent to repair the multicast tree.parent
- The suspected faulty parent.public boolean anycastHandler(rice.scribe.messaging.ScribeMessage msg)
anycastHandler
in interface IScribeApp
msg
- The corresponding Anycast message
public void subscribeHandler(rice.pastry.NodeId topicId, rice.pastry.NodeHandle child, boolean wasAdded, java.io.Serializable obj)
subscribeHandler
in interface IScribeApp
topicId
- The topic for which child was added or removed.child
- The corresponding child.wasAdded
- true if child was added and false if child was removed.obj
- The additional data associated with the subscription message, SUBSCRIBE
msg, sent by the "original" child, not the forwarding node.public void create(rice.pastry.NodeId topicId)
public void multicast(rice.pastry.NodeId topicId, java.io.Serializable data)
public void anycast(rice.pastry.NodeId topicId, java.io.Serializable data)
public void join(rice.pastry.NodeId topicId)
public void leave(rice.pastry.NodeId topicId)
public rice.pastry.security.Credentials getCredentials()
PastryAppl
getCredentials
in class PastryAppl
public rice.pastry.messaging.Address getAddress()
PastryAppl
getAddress
in class PastryAppl
public void messageForAppl(rice.pastry.messaging.Message msg)
PastryAppl
messageForAppl
in class PastryAppl
msg
- the message that is arriving.public void isNewRoot(rice.pastry.NodeId topicId)
isNewRoot
in interface IScribeApp
topicId
- The topic for which local node is the
new root.public void newParent(rice.pastry.NodeId topicId, rice.pastry.NodeHandle newParent, java.io.Serializable data)
newParent
in interface IScribeApp
topicId
- The topic for which new parent is foundnewParent
- The new parentdata
- The data received with the ACK message.
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |