Package org.jcsp.net2
Class Node
- java.lang.Object
-
- org.jcsp.net2.Node
-
public final class Node extends Object
- Author:
- Kevin Chalmers
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Node.Logger
-
Field Summary
Fields Modifier and Type Field Description static Node.Logger
err
static Node.Logger
log
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Node
getInstance()
AltingChannelInput
getLinkLostEventChannel()
NodeID
getNodeID()
NodeKey
init(String name, NodeAddress addr)
NodeKey
init(NodeAddress addr)
NodeKey
init(NodeFactory factory)
void
setErr(OutputStream stream)
void
setLog(OutputStream stream)
-
-
-
Field Detail
-
log
public static Node.Logger log
-
err
public static Node.Logger err
-
-
Method Detail
-
getInstance
public static Node getInstance()
- Returns:
- The singleton instance of the Node
-
getNodeID
public NodeID getNodeID()
- Returns:
- The NodeID of this Node
-
init
public NodeKey init(NodeAddress addr) throws JCSPNetworkException
- Parameters:
addr
-- Returns:
- NodeKey for this Node
- Throws:
JCSPNetworkException
-
init
public NodeKey init(String name, NodeAddress addr) throws JCSPNetworkException
- Parameters:
name
-addr
-- Returns:
- NodeKey for this Node
- Throws:
JCSPNetworkException
-
init
public NodeKey init(NodeFactory factory) throws JCSPNetworkException
- Parameters:
factory
-- Returns:
- NodeKey for this Node
- Throws:
JCSPNetworkException
-
getLinkLostEventChannel
public AltingChannelInput getLinkLostEventChannel()
- Returns:
- A channel to receive disconnect events on
-
setLog
public void setLog(OutputStream stream)
- Parameters:
stream
-
-
setErr
public void setErr(OutputStream stream)
- Parameters:
stream
-
-
-