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 interface
Allows for the creation ofNode
instances on-the-fly.static interface
Represents a pending node shut-down process.static interface
Represents 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 theNodeId
getState()
Gets the state of the node.
-
Field Details
-
NAME
An indicator of the Node's name to be used with theNamed
annotation.- See Also:
-
MASTER_NODE_NAME
Designates a master/controlNode
. EachInstance
has a masterNode
that handles the basic services required to operate theNode
. This is used in conjunction with theNamed
annotation 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 theNode
and 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
NodeState
indicating the state of the node.
-
beginStartup
Node.Startup beginStartup()Begins the startup process by returning an instance ofNode.Startup
.- Returns:
- the pending
Node.Startup
object
-
beginShutdown
Node.Shutdown beginShutdown()Begins the shutdown process.- Returns:
- the
Node.Shutdown
object
-