public class MessageSerializationTestNode extends java.lang.Object implements NodeMain
Constructor and Description |
---|
MessageSerializationTestNode() |
Modifier and Type | Method and Description |
---|---|
GraphName |
getDefaultNodeName() |
void |
onError(Node node,
java.lang.Throwable throwable)
Called when the
Node experiences an unrecoverable error. |
void |
onShutdown(Node node)
Called when the
ConnectedNode has started shutting down. |
void |
onShutdownComplete(Node node)
Called when the
Node has shut down. |
void |
onStart(ConnectedNode connectedNode)
Called when the
Node has started and successfully connected to the
master. |
public GraphName getDefaultNodeName()
getDefaultNodeName
in interface NodeMain
Node
that will be used if a name was not
specified in the Node
's associated
NodeConfiguration
public void onStart(ConnectedNode connectedNode)
NodeListener
Node
has started and successfully connected to the
master.onStart
in interface NodeListener
connectedNode
- the ConnectedNode
that has been startedpublic void onShutdown(Node node)
NodeListener
ConnectedNode
has started shutting down. Shutdown
will be delayed, although not indefinitely, until all NodeListener
s
have returned from this method.
Since this method can potentially delay ConnectedNode
shutdown, it
is preferred to use NodeListener.onShutdownComplete(Node)
when
ConnectedNode
resources are not required during the method call.
onShutdown
in interface NodeListener
node
- the Node
that has started shutting downpublic void onShutdownComplete(Node node)
NodeListener
Node
has shut down.onShutdownComplete
in interface NodeListener
node
- the Node
that has shut downpublic void onError(Node node, java.lang.Throwable throwable)
NodeListener
Node
experiences an unrecoverable error.onError
in interface NodeListener
node
- the Node
that experienced the errorthrowable
- the Throwable
describing the error condition