Package 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.- Author:
- damonkohler@google.com (Damon Kohler)
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(NodeMain nodeMain, NodeConfiguration nodeConfiguration) Executes the suppliedNodeMainusing the suppliedNodeConfiguration.voidexecute(NodeMain nodeMain, NodeConfiguration nodeConfiguration, Collection<NodeListener> nodeListeners) Executes the suppliedNodeMainusing the suppliedNodeConfiguration.voidshutdown()Shutdown all startedNodes.voidshutdownNodeMain(NodeMain nodeMain) Shuts down the suppliedNodeMain(i.e.
-
Method Details
-
getScheduledExecutorService
ScheduledExecutorService getScheduledExecutorService()- Returns:
- the
ScheduledExecutorServicethat thisNodeMainExecutoruses
-
execute
void execute(NodeMain nodeMain, NodeConfiguration nodeConfiguration, Collection<NodeListener> nodeListeners) Executes the suppliedNodeMainusing the suppliedNodeConfiguration.- Parameters:
nodeMain- theNodeMainto executenodeConfiguration- theNodeConfigurationthat will be used to create theNodenodeListeners- aCollectionofNodeListeners to be added to theNodebefore it starts, can benull
-
execute
Executes the suppliedNodeMainusing the suppliedNodeConfiguration.- Parameters:
nodeMain- theNodeMainto executenodeConfiguration- theNodeConfigurationthat will be used to create theNode
-
shutdownNodeMain
Shuts down the suppliedNodeMain(i.e.NodeListener.onShutdown(Node)will be called). This does not necessarily shut down theNodethat is associated with theNodeMain.This has no effect if the
NodeMainhas not started.- Parameters:
nodeMain- theNodeMainto shutdown
-
shutdown
void shutdown()Shutdown all startedNodes. This does not shut down the suppliedExecutorService.
-