org.ros.internal.node.server.master
Class NodeRegistrationInfo

java.lang.Object
  extended by org.ros.internal.node.server.master.NodeRegistrationInfo

public class NodeRegistrationInfo
extends java.lang.Object

Information a master needs about a node.


Constructor Summary
NodeRegistrationInfo(GraphName nodeName, java.net.URI nodeSlaveUri)
           
 
Method Summary
 void addPublisher(TopicRegistrationInfo publisherTopic)
          Add a new publisher to the node.
 void addService(ServiceRegistrationInfo service)
          Add a new service to the node.
 void addSubscriber(TopicRegistrationInfo subscriberTopic)
          Add a new subscriber to the node.
 boolean equals(java.lang.Object obj)
           
 GraphName getNodeName()
           
 java.net.URI getNodeSlaveUri()
           
 java.util.Set<TopicRegistrationInfo> getPublishers()
          Get all known topics published by the node.
 java.util.Set<ServiceRegistrationInfo> getServices()
          Get all known services provided by the node.
 java.util.Set<TopicRegistrationInfo> getSubscribers()
          Get all known topics subscribed to by the node.
 int hashCode()
           
 boolean hasRegistrations()
          Does the node have any registrations of any sort.
 boolean removePublisher(TopicRegistrationInfo publisherTopic)
          Remove a publisher from the node.
 boolean removeService(ServiceRegistrationInfo service)
          Remove a service from the node.
 boolean removeSubscriber(TopicRegistrationInfo subscriberTopic)
          Remove a subscriber from the node.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeRegistrationInfo

public NodeRegistrationInfo(GraphName nodeName,
                            java.net.URI nodeSlaveUri)
Method Detail

getNodeName

public GraphName getNodeName()
Returns:
the nodeName

getNodeSlaveUri

public java.net.URI getNodeSlaveUri()
Returns:
the nodeSlaveUri

hasRegistrations

public boolean hasRegistrations()
Does the node have any registrations of any sort.

Returns:
{code true} if there are still registrations for the node.

getPublishers

public java.util.Set<TopicRegistrationInfo> getPublishers()
Get all known topics published by the node.

Returns:
an immutable copy of the published topics

addPublisher

public void addPublisher(TopicRegistrationInfo publisherTopic)
Add a new publisher to the node.

Parameters:
publisherTopic - the topic information about the publisher to add

removePublisher

public boolean removePublisher(TopicRegistrationInfo publisherTopic)
Remove a publisher from the node.

Parameters:
publisherTopic - the topic information about the publisher to remove
Returns:
true if the publisher had been there

getSubscribers

public java.util.Set<TopicRegistrationInfo> getSubscribers()
Get all known topics subscribed to by the node.

Returns:
an immutable copy of the topics subscribed to

addSubscriber

public void addSubscriber(TopicRegistrationInfo subscriberTopic)
Add a new subscriber to the node.

Parameters:
subscriberTopic - the topic information about the subscriber to add

removeSubscriber

public boolean removeSubscriber(TopicRegistrationInfo subscriberTopic)
Remove a subscriber from the node.

Parameters:
subscriberTopic - the topic information about the subscriber to remove
Returns:
true if the subscriber had been there

getServices

public java.util.Set<ServiceRegistrationInfo> getServices()
Get all known services provided by the node.

Returns:
an immutable copy of the topics subscribed to

addService

public void addService(ServiceRegistrationInfo service)
Add a new service to the node.

Parameters:
service - the service to add

removeService

public boolean removeService(ServiceRegistrationInfo service)
Remove a service from the node.

Parameters:
service - the service to remove
Returns:
true if the subscriber had been there

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object