public interface NodeMainExecutor
Modifier and Type | Method and Description |
---|---|
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
Node s. |
void |
shutdownNodeMain(NodeMain nodeMain)
Shuts down the supplied
NodeMain (i.e. |
java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
ScheduledExecutorService
that this
NodeMainExecutor
usesvoid execute(NodeMain nodeMain, NodeConfiguration nodeConfiguration, java.util.Collection<NodeListener> nodeListeners)
NodeMain
using the supplied
NodeConfiguration
.nodeMain
- the NodeMain
to executenodeConfiguration
- the NodeConfiguration
that will be used to create the
Node
nodeListeners
- a Collection
of NodeListener
s to be added to the
Node
before it starts, can be null
void execute(NodeMain nodeMain, NodeConfiguration nodeConfiguration)
NodeMain
using the supplied
NodeConfiguration
.nodeMain
- the NodeMain
to executenodeConfiguration
- the NodeConfiguration
that will be used to create the
Node
void shutdownNodeMain(NodeMain nodeMain)
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.
nodeMain
- the NodeMain
to shutdownvoid shutdown()
Node
s. This does not shut down the supplied
ExecutorService
.