org.ros.node.topic
Class DefaultPublisherListener<T>

java.lang.Object
  extended by org.ros.node.topic.DefaultPublisherListener<T>
All Implemented Interfaces:
RegistrantListener<Publisher<T>>, PublisherListener<T>

public class DefaultPublisherListener<T>
extends java.lang.Object
implements PublisherListener<T>

A PublisherListener which provides empty defaults for all signals.


Constructor Summary
DefaultPublisherListener()
           
 
Method Summary
 void onMasterRegistrationFailure(Publisher<T> publisher)
          The registrant has failed to register with the master.
 void onMasterRegistrationSuccess(Publisher<T> publisher)
          The registrant has been registered with the master.
 void onMasterUnregistrationFailure(Publisher<T> publisher)
          The registrant has failed to unregister with the master.
 void onMasterUnregistrationSuccess(Publisher<T> publisher)
          The registrant has been unregistered with the master.
 void onNewSubscriber(Publisher<T> publisher, SubscriberIdentifier subscriberIdentifier)
          A Subscriber has connected to the Publisher.
 void onShutdown(Publisher<T> publisher)
          The Publisher has been shut down.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPublisherListener

public DefaultPublisherListener()
Method Detail

onMasterRegistrationSuccess

public void onMasterRegistrationSuccess(Publisher<T> publisher)
Description copied from interface: RegistrantListener
The registrant has been registered with the master.

Specified by:
onMasterRegistrationSuccess in interface RegistrantListener<Publisher<T>>
Parameters:
publisher - the registrant which has been registered

onMasterRegistrationFailure

public void onMasterRegistrationFailure(Publisher<T> publisher)
Description copied from interface: RegistrantListener
The registrant has failed to register with the master.

This may be called multiple times per registrant since master registration will be retried until success.

Specified by:
onMasterRegistrationFailure in interface RegistrantListener<Publisher<T>>
Parameters:
publisher - the registrant which has been registered

onMasterUnregistrationSuccess

public void onMasterUnregistrationSuccess(Publisher<T> publisher)
Description copied from interface: RegistrantListener
The registrant has been unregistered with the master.

Specified by:
onMasterUnregistrationSuccess in interface RegistrantListener<Publisher<T>>
Parameters:
publisher - the registrant which has been unregistered

onMasterUnregistrationFailure

public void onMasterUnregistrationFailure(Publisher<T> publisher)
Description copied from interface: RegistrantListener
The registrant has failed to unregister with the master.

This may be called multiple times per registrant since master unregistration will be retried until success.

Specified by:
onMasterUnregistrationFailure in interface RegistrantListener<Publisher<T>>
Parameters:
publisher - the registrant which has been unregistered

onNewSubscriber

public void onNewSubscriber(Publisher<T> publisher,
                            SubscriberIdentifier subscriberIdentifier)
Description copied from interface: PublisherListener
A Subscriber has connected to the Publisher.

Specified by:
onNewSubscriber in interface PublisherListener<T>
Parameters:
publisher - the Publisher that the Subscriber connected to
subscriberIdentifier - the SubscriberIdentifier of the new Subscriber

onShutdown

public void onShutdown(Publisher<T> publisher)
Description copied from interface: PublisherListener
The Publisher has been shut down.

Specified by:
onShutdown in interface PublisherListener<T>
Parameters:
publisher - the Publisher that was shut down