org.ros.node
Interface NodeMainExecutor

All Known Implementing Classes:
DefaultNodeMainExecutor

public interface NodeMainExecutor

Executes NodeMains and allows shutting down individual NodeMains or all currently running NodeMains as a group.


Method Summary
 void execute(NodeMain nodeMain, NodeConfiguration nodeConfiguration)
          Executes the supplied NodeMain using the supplied NodeConfiguration.
 void execute(NodeMain nodeMain, NodeConfiguration nodeConfiguration, java.util.Collection<NodeListener> nodeListeners)
          Executes the supplied NodeMain using the supplied NodeConfiguration.
 java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
           
 void shutdown()
          Shutdown all started Nodes.
 void shutdownNodeMain(NodeMain nodeMain)
          Shuts down the supplied NodeMain (i.e.
 

Method Detail

getScheduledExecutorService

java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
Returns:
the ScheduledExecutorService that this NodeMainExecutor uses

execute

void execute(NodeMain nodeMain,
             NodeConfiguration nodeConfiguration,
             java.util.Collection<NodeListener> nodeListeners)
Executes the supplied NodeMain using the supplied NodeConfiguration.

Parameters:
nodeMain - the NodeMain to execute
nodeConfiguration - the NodeConfiguration that will be used to create the Node
nodeListeners - a Collection of NodeListeners to be added to the Node before it starts, can be null

execute

void execute(NodeMain nodeMain,
             NodeConfiguration nodeConfiguration)
Executes the supplied NodeMain using the supplied NodeConfiguration.

Parameters:
nodeMain - the NodeMain to execute
nodeConfiguration - the NodeConfiguration that will be used to create the Node

shutdownNodeMain

void shutdownNodeMain(NodeMain nodeMain)
Shuts down the supplied NodeMain (i.e. NodeListener.onShutdown(Node) will be called). This does not necessarily shut down the Node that is associated with the NodeMain.

This has no effect if the NodeMain has not started.

Parameters:
nodeMain - the NodeMain to shutdown

shutdown

void shutdown()
Shutdown all started Nodes. This does not shut down the supplied ExecutorService.