org.ros.node
Interface NodeListener

All Known Subinterfaces:
NodeMain
All Known Implementing Classes:
AbstractNodeMain, Client, DefaultNodeListener, Listener, Server, Talker

public interface NodeListener

A listener for lifecycle events on a Node.


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.
 

Method Detail

onStart

void onStart(ConnectedNode connectedNode)
Called when the Node has started and successfully connected to the master.

Parameters:
connectedNode - the ConnectedNode that has been started

onShutdown

void onShutdown(Node node)
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 onShutdownComplete(Node) when ConnectedNode resources are not required during the method call.

Parameters:
node - the Node that has started shutting down

onShutdownComplete

void onShutdownComplete(Node node)
Called when the Node has shut down.

Parameters:
node - the Node that has shut down

onError

void onError(Node node,
             java.lang.Throwable throwable)
Called when the Node experiences an unrecoverable error.

Parameters:
node - the Node that experienced the error
throwable - the Throwable describing the error condition