|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.scribe.testing.DirectScribeMaintenanceTestApp
Field Summary | |
java.util.Hashtable |
joinData
|
int |
m_appCount
|
Scribe |
m_scribe
|
Constructor Summary | |
DirectScribeMaintenanceTestApp(PastryNode node,
Scribe scribe,
Credentials cred)
Constructor |
Method Summary | |
void |
anycast(NodeId topicId)
direct call to scribe for anycasting to a topic from the current node |
boolean |
anycastHandler(ScribeMessage msg)
up-call invoked by Scribe when an anycast message is being handled. |
void |
create(NodeId topicId)
direct call to scribe for creating a topic from the current node. |
void |
faultHandler(ScribeMessage msg,
NodeHandle parent)
up-call invoked by scribe when a node detects a failure from its parent. |
void |
forwardHandler(ScribeMessage msg)
up-call invoked by scribe when a publish message is forwarded through the multicast tree. |
java.lang.Object |
getJoinData(NodeId topicId)
|
NodeHandle |
getLocalHandle()
|
NodeId |
getNodeId()
|
Scribe |
getScribe()
Returns the underlying scribe object. |
void |
isNewRoot(NodeId topicId)
Upcall by scribe to let this application know that it is the new root. |
void |
join(NodeId topicId)
direct call to scribe for subscribing to a topic from the current node. |
void |
join(NodeId topicId,
java.io.Serializable obj)
direct call to scribe for subscribing to a topic from the current node. |
void |
leave(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 |
multicast(NodeId topicId)
direct call to scribe for publishing to a topic from the current node. |
void |
newParent(NodeId topicId,
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 |
receiveMessage(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(NodeId topicId,
NodeHandle child,
boolean wasAdded,
java.io.Serializable obj)
up-call invoked by scribe when a node is added/removed to the multicast tree. |
void |
update(java.lang.Object obj)
Method called by underlying scribe whenever a topic object is created impliclity. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Scribe m_scribe
public int m_appCount
public java.util.Hashtable joinData
Constructor Detail |
public DirectScribeMaintenanceTestApp(PastryNode node, Scribe scribe, Credentials cred)
node
- The local PastryNodescribe
- The underlying scribecred
- The credentialsMethod Detail |
public Scribe getScribe()
public void scribeIsReady()
IScribeApp
scribeIsReady
in interface IScribeApp
public void receiveMessage(ScribeMessage msg)
receiveMessage
in interface IScribeApp
msg
- The message sent in the PUBLISH message.public void forwardHandler(ScribeMessage msg)
forwardHandler
in interface IScribeApp
msg
- The message about to be forwarded.public void faultHandler(ScribeMessage msg, 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(ScribeMessage msg)
anycastHandler
in interface IScribeApp
msg
- The corresponding Anycast message
public void subscribeHandler(NodeId topicId, 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 NodeId getNodeId()
public void create(NodeId topicId)
public void multicast(NodeId topicId)
public void join(NodeId topicId)
public void join(NodeId topicId, java.io.Serializable obj)
public void leave(NodeId topicId)
public void anycast(NodeId topicId)
public NodeHandle getLocalHandle()
public void update(java.lang.Object obj)
update
in interface IScribeObserver
obj
- The topicId.public java.lang.Object getJoinData(NodeId topicId)
public void isNewRoot(NodeId topicId)
isNewRoot
in interface IScribeApp
topicId
- The topic for which local node is the
new root.public void newParent(NodeId topicId, 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |