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 classNode.Logger
-
Field Summary
Fields Modifier and Type Field Description static Node.Loggererrstatic Node.Loggerlog
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NodegetInstance()AltingChannelInputgetLinkLostEventChannel()NodeIDgetNodeID()NodeKeyinit(String name, NodeAddress addr)NodeKeyinit(NodeAddress addr)NodeKeyinit(NodeFactory factory)voidsetErr(OutputStream stream)voidsetLog(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-
-
-