Class NodeRegistrationInfo

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

public class NodeRegistrationInfo extends Object
Information a master needs about a node.
Author:
khughes@google.com (Keith M. Hughes)
  • Constructor Details

    • NodeRegistrationInfo

      public NodeRegistrationInfo(GraphName nodeName, URI nodeSlaveUri)
  • Method Details

    • getNodeName

      public GraphName getNodeName()
      Returns:
      the nodeName
    • getNodeSlaveUri

      public 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 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 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 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 Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object