Class TopicRegistrationInfo
java.lang.Object
org.ros.internal.node.server.master.TopicRegistrationInfo
All information known to the manager about a topic.
- Author:
- khughes@google.com (Keith M. Hughes)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPublisher(NodeRegistrationInfo publisher, String messageType) Add a new publisher to the topic.voidaddSubscriber(NodeRegistrationInfo subscriber, String messageType) Add a new subscriber to the topic.booleanGet the currently known message type of the topic.Get a list of all known publishers for the topic.Get a list of all known subscribers for the topic.inthashCode()booleanDoes the topic have any publishers?booleanDoes the topic have any registrations?booleanDoes the topic have any subscribers?booleanremovePublisher(NodeRegistrationInfo publisher) Remove a publisher to the topic.booleanremoveSubscriber(NodeRegistrationInfo subscriber) Remove a subscriber to the topic.
-
Constructor Details
-
TopicRegistrationInfo
-
-
Method Details
-
getTopicName
- Returns:
- the topicName
-
getMessageType
Get the currently known message type of the topic.- Returns:
- The message type. Can be
nullif unknown.
-
hasPublishers
public boolean hasPublishers()Does the topic have any publishers?- Returns:
trueif the topic has any publishers.
-
hasSubscribers
public boolean hasSubscribers()Does the topic have any subscribers?- Returns:
trueif the topic has any publishers or subscribers.
-
hasRegistrations
public boolean hasRegistrations()Does the topic have any registrations?- Returns:
trueif the topic has any publishers or subscribers.
-
getPublishers
Get a list of all known publishers for the topic.- Returns:
- an immutable list of publishers
-
addPublisher
Add a new publisher to the topic.- Parameters:
publisher- the publisher to addmessageType- the type of the message
-
removePublisher
Remove a publisher to the topic.- Parameters:
publisher- the publisher to add- Returns:
trueif the publisher was registered in the first place
-
getSubscribers
Get a list of all known subscribers for the topic.- Returns:
- an immutable list of publishers
-
addSubscriber
Add a new subscriber to the topic.- Parameters:
subscriber- the subscriber to addmessageType- the type of the message
-
removeSubscriber
Remove a subscriber to the topic.- Parameters:
subscriber- the subscriber to add- Returns:
trueif the subscriber was registered in the first place
-
hashCode
public int hashCode() -
equals
-