public abstract class NodeBase extends NodeComponentImpl implements Node, ComponentManager
Node.NodeState| Constructor and Description |
|---|
NodeBase() |
| Modifier and Type | Method and Description |
|---|---|
static void |
enterMultiCommands() |
NodeComponentImpl |
getComponent(NodeComponentKey inKey)
Obtain the component registered with the provided key.
|
NodeDetails |
getDetails() |
java.lang.String |
getName() |
static NodeBase |
getNode() |
Node.NodeState |
getState() |
void |
registerComponent(NodeComponentKey inKey,
NodeComponentImpl inComponent)
Register a component with this component manager.
|
boolean |
runCommand(java.lang.String... cargs)
Pass a command to be executed by the node.
|
<T> ScheduledTask<T> |
runTask(ScheduledTask<T> inTask)
Run a task in this node's thread pool.
|
void |
startNode(java.lang.ThreadGroup inThreadGroup)
Register this node's message events.
|
void |
stopNode()
Interrupt and stop node threads.
|
java.lang.String |
toString() |
void |
unregisterComponent(NodeComponentImpl inComponent)
Unregister a previously registered component.
|
getComponentKey, getComponentLink, hashCode, setComponentKey, startComponent, stopComponentpublic static NodeBase getNode()
public java.lang.String getName()
public NodeDetails getDetails()
getDetails in interface Nodepublic Node.NodeState getState()
public final void startNode(java.lang.ThreadGroup inThreadGroup)
throws ComponentException,
java.lang.InterruptedException
startNode in interface NodeinDetails - java.lang.InterruptedExceptionComponentExceptionpublic final void stopNode()
Nodepublic void registerComponent(NodeComponentKey inKey, NodeComponentImpl inComponent)
ComponentManagerregisterComponent in interface ComponentManagerinKey - - The key used to retrieve this component.inComponent - - The component being registered.public NodeComponentImpl getComponent(NodeComponentKey inKey) throws ComponentException
ComponentManagergetComponent in interface ComponentManagerinKey - - The key associated with a registered component.ComponentExceptionpublic void unregisterComponent(NodeComponentImpl inComponent)
ComponentManagerunregisterComponent in interface ComponentManagerinComponent - - The component to unregister.public <T> ScheduledTask<T> runTask(ScheduledTask<T> inTask)
Nodepublic boolean runCommand(java.lang.String... cargs)
throws java.lang.Exception
NoderunCommand in interface Nodecargs - - The command arguments.java.lang.Exceptionpublic static void enterMultiCommands()
public java.lang.String toString()
toString in class java.lang.Object