|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.p2p.multiring.MultiringNode
public class MultiringNode
Field Summary | |
---|---|
protected MultiringNodeCollection |
collection
The collection, which keeps track of the other nodes on the ring node |
protected java.util.Hashtable |
endpoints
The list of all of the endpoints connected to this node |
protected Environment |
environment
The environment |
protected MultiringIdFactory |
factory
A cached IdFactory for internal use |
protected Logger |
logger
|
protected Node |
node
The node which this mulitring node is wrapping |
protected Id |
ringId
The Id which represents the current ring this node is a member of |
protected Scribe |
scribe
The Scribe application which the node uses to do routing |
Constructor Summary | |
---|---|
MultiringNode(Id ringId,
Node node)
Constructor |
|
MultiringNode(Id ringId,
Node node,
MultiringNode existing)
Constructor |
Method Summary | |
---|---|
boolean |
anycast(Topic topic,
ScribeContent content)
This method is invoked when an anycast is received for a topic which this client is interested in. |
void |
childAdded(Topic topic,
NodeHandle child)
Informs this client that a child was added to a topic in which it was interested in. |
void |
childRemoved(Topic topic,
NodeHandle child)
Informs this client that a child was removed from a topic in which it was interested in. |
void |
deliver(Topic topic,
ScribeContent content)
This method is invoked when a message is delivered for a topic this client is interested in. |
MultiringNodeCollection |
getCollection()
Returns the collection this node is a member of |
Environment |
getEnvironment()
Getter for the environment. |
Id |
getId()
Returns the Id of this node |
IdFactory |
getIdFactory()
Returns a factory for Ids specific to this node's protocol. |
NodeHandle |
getLocalNodeHandle()
Returns a handle to the local node. |
Node |
getNode()
Returns this mutliring node's internal node |
Id |
getNodeId()
Returns the underlying id of this node |
Id |
getRingId()
Returns the ringId of this node |
protected void |
nodeAdded(Id otherRingId)
Method which is used to inform the node that another node has been added to the collection. |
Endpoint |
registerApplication(Application application,
int port)
This returns a Endpoint specific to the given application and instance name to the application, which the application can then use in order to send an receive messages. |
Endpoint |
registerApplication(Application application,
java.lang.String instance)
This returns a VirtualizedNode specific to the given application and instance name to the application, which the application can then use in order to send an receive messages. |
void |
subscribeFailed(Topic topic)
Informs the client that a subscribe on the given topic failed - the client should retry the subscribe or take appropriate action. |
java.lang.String |
toString()
Prints out the string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Node node
protected Id ringId
protected Scribe scribe
protected MultiringNodeCollection collection
protected java.util.Hashtable endpoints
protected MultiringIdFactory factory
protected Environment environment
protected Logger logger
Constructor Detail |
---|
public MultiringNode(Id ringId, Node node)
node
- The node which this multiring node is wrappingringId
- The Id of this node's ringpublic MultiringNode(Id ringId, Node node, MultiringNode existing)
node
- The node which this multiring node is wrappingringId
- The Id of this node's ringexisting
- An existing node which this node should pair withMethod Detail |
---|
public NodeHandle getLocalNodeHandle()
Node
getLocalNodeHandle
in interface Node
public Endpoint registerApplication(Application application, java.lang.String instance)
registerApplication
in interface Node
application
- The Applicationinstance
- An identifier for a given instance
public Endpoint registerApplication(Application application, int port)
registerApplication
in interface Node
application
- The Applicationport
- The port to use
public Id getId()
getId
in interface Node
public Id getRingId()
public Id getNodeId()
public Node getNode()
public MultiringNodeCollection getCollection()
public IdFactory getIdFactory()
getIdFactory
in interface Node
protected void nodeAdded(Id otherRingId)
id
- The Id of the newly added ringpublic boolean anycast(Topic topic, ScribeContent content)
anycast
in interface ScribeClient
topic
- The topic the message was anycasted tocontent
- The content which was anycasted
public void deliver(Topic topic, ScribeContent content)
deliver
in interface ScribeClient
topic
- The topic the message was published tocontent
- The content which was publishedpublic void childAdded(Topic topic, NodeHandle child)
childAdded
in interface ScribeClient
topic
- The topic to unsubscribe fromchild
- The child that was addedpublic void childRemoved(Topic topic, NodeHandle child)
childRemoved
in interface ScribeClient
topic
- The topic to unsubscribe fromchild
- The child that was removedpublic void subscribeFailed(Topic topic)
subscribeFailed
in interface ScribeClient
topic
- The topic which the subscribe failed onpublic java.lang.String toString()
toString
in class java.lang.Object
public Environment getEnvironment()
getEnvironment
in interface Node
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |