Interface Node
- All Known Implementing Classes:
JeroMQNode
public interface Node
Represents the worker node for a single Application. This is a simple interface which in and of itself does nothing
more than provide a means to start and stop the service. Conceptually, however, a Node represents the core
functionality for a given Application, e.g. resource management, task management--generally everything related to
Application logic execution.
Additionally the node itself is responsible for opening and maintaining the connection. The logic housed in the
node will receive incoming messages and dispatch them to local services.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAllows for the creation ofNodeinstances on-the-fly.static interfaceRepresents a pending node shut-down process.static interfaceRepresents a pending node start-up process. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionBegins the shutdown process.Begins the startup process by returning an instance ofNode.Startup.getName()Gets the symbolic name of the node.Gets theNodeIdgetState()Gets the state of the node.
-
Field Details
-
NAME
An indicator of the Node's name to be used with theNamedannotation.- See Also:
-
MASTER_NODE_NAME
Designates a master/controlNode. EachInstancehas a masterNodethat handles the basic services required to operate theNode. This is used in conjunction with theNamedannotation and not thegetName()method.- See Also:
-
-
Method Details
-
getName
String getName()Gets the symbolic name of the node. This can be assigned by the container or assigned in configuration. It should be human readable, and should be unique per Instance. Used just for symbolic naming of theNodeand in logging.- Returns:
- the name of the node
-
getNodeId
NodeId getNodeId()Gets theNodeId- Returns:
- the
NodeId
-
getState
NodeState getState()Gets the state of the node.- Returns:
- the
NodeStateindicating the state of the node.
-
beginStartup
Node.Startup beginStartup()Begins the startup process by returning an instance ofNode.Startup.- Returns:
- the pending
Node.Startupobject
-
beginShutdown
Node.Shutdown beginShutdown()Begins the shutdown process.- Returns:
- the
Node.Shutdownobject
-