public class TopicRegistrationInfo
extends java.lang.Object
Constructor and Description |
---|
TopicRegistrationInfo(GraphName topicName) |
Modifier and Type | Method and Description |
---|---|
void |
addPublisher(NodeRegistrationInfo publisher,
java.lang.String messageType)
Add a new publisher to the topic.
|
void |
addSubscriber(NodeRegistrationInfo subscriber,
java.lang.String messageType)
Add a new subscriber to the topic.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getMessageType()
Get the currently known message type of the topic.
|
java.util.Set<NodeRegistrationInfo> |
getPublishers()
Get a list of all known publishers for the topic.
|
java.util.Set<NodeRegistrationInfo> |
getSubscribers()
Get a list of all known subscribers for the topic.
|
GraphName |
getTopicName() |
int |
hashCode() |
boolean |
hasPublishers()
Does the topic have any publishers?
|
boolean |
hasRegistrations()
Does the topic have any registrations?
|
boolean |
hasSubscribers()
Does the topic have any subscribers?
|
boolean |
removePublisher(NodeRegistrationInfo publisher)
Remove a publisher to the topic.
|
boolean |
removeSubscriber(NodeRegistrationInfo subscriber)
Remove a subscriber to the topic.
|
public TopicRegistrationInfo(GraphName topicName)
public GraphName getTopicName()
public java.lang.String getMessageType()
null
if unknown.public boolean hasPublishers()
true
if the topic has any publishers.public boolean hasSubscribers()
true
if the topic has any publishers or subscribers.public boolean hasRegistrations()
true
if the topic has any publishers or subscribers.public java.util.Set<NodeRegistrationInfo> getPublishers()
public void addPublisher(NodeRegistrationInfo publisher, java.lang.String messageType)
publisher
- the publisher to addmessageType
- the type of the messagepublic boolean removePublisher(NodeRegistrationInfo publisher)
publisher
- the publisher to addtrue
if the publisher was registered in the first placepublic java.util.Set<NodeRegistrationInfo> getSubscribers()
public void addSubscriber(NodeRegistrationInfo subscriber, java.lang.String messageType)
subscriber
- the subscriber to addmessageType
- the type of the messagepublic boolean removeSubscriber(NodeRegistrationInfo subscriber)
subscriber
- the subscriber to addtrue
if the subscriber was registered in the first placepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object