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

java.lang.Object
  extended by org.ros.node.topic.DefaultSubscriberListener<T>
All Implemented Interfaces:
RegistrantListener<Subscriber<T>>, SubscriberListener<T>

public class DefaultSubscriberListener<T>
extends java.lang.Object
implements SubscriberListener<T>

A SubscriberListener which provides empty defaults for all signals.


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

Constructor Detail

DefaultSubscriberListener

public DefaultSubscriberListener()
Method Detail

onMasterRegistrationSuccess

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

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

onMasterRegistrationFailure

public void onMasterRegistrationFailure(Subscriber<T> subscriber)
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<Subscriber<T>>
Parameters:
subscriber - the registrant which has been registered

onMasterUnregistrationSuccess

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

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

onMasterUnregistrationFailure

public void onMasterUnregistrationFailure(Subscriber<T> subscriber)
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<Subscriber<T>>
Parameters:
subscriber - the registrant which has been unregistered

onNewPublisher

public void onNewPublisher(Subscriber<T> subscriber,
                           PublisherIdentifier publisherIdentifier)
Description copied from interface: SubscriberListener
A new Publisher has connected to the Subscriber.

Specified by:
onNewPublisher in interface SubscriberListener<T>
Parameters:
subscriber - the Subscriber that the Publisher connected to
publisherIdentifier - the PublisherIdentifier of the new Publisher

onShutdown

public void onShutdown(Subscriber<T> subscriber)
Description copied from interface: SubscriberListener
The Subscriber has been shut down.

Specified by:
onShutdown in interface SubscriberListener<T>
Parameters:
subscriber - the Subscriber that was shut down