org.ros.node
Class DefaultNodeListener

java.lang.Object
  extended by org.ros.node.DefaultNodeListener
All Implemented Interfaces:
NodeListener

public class DefaultNodeListener
extends java.lang.Object
implements NodeListener

A NodeListener which provides empty defaults for all signals.


Constructor Summary
DefaultNodeListener()
           
 
Method Summary
 void onError(Node node, java.lang.Throwable throwable)
          Called when the Node experiences an unrecoverable error.
 void onShutdown(Node node)
          Called when the ConnectedNode has started shutting down.
 void onShutdownComplete(Node node)
          Called when the Node has shut down.
 void onStart(ConnectedNode connectedNode)
          Called when the Node has started and successfully connected to the master.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNodeListener

public DefaultNodeListener()
Method Detail

onStart

public void onStart(ConnectedNode connectedNode)
Description copied from interface: NodeListener
Called when the Node has started and successfully connected to the master.

Specified by:
onStart in interface NodeListener
Parameters:
connectedNode - the ConnectedNode that has been started

onShutdown

public void onShutdown(Node node)
Description copied from interface: NodeListener
Called when the ConnectedNode has started shutting down. Shutdown will be delayed, although not indefinitely, until all NodeListeners have returned from this method.

Since this method can potentially delay ConnectedNode shutdown, it is preferred to use NodeListener.onShutdownComplete(Node) when ConnectedNode resources are not required during the method call.

Specified by:
onShutdown in interface NodeListener
Parameters:
node - the Node that has started shutting down

onShutdownComplete

public void onShutdownComplete(Node node)
Description copied from interface: NodeListener
Called when the Node has shut down.

Specified by:
onShutdownComplete in interface NodeListener
Parameters:
node - the Node that has shut down

onError

public void onError(Node node,
                    java.lang.Throwable throwable)
Description copied from interface: NodeListener
Called when the Node experiences an unrecoverable error.

Specified by:
onError in interface NodeListener
Parameters:
node - the Node that experienced the error
throwable - the Throwable describing the error condition