|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcsp.net.tcpip.TCPIPNodeFactory
public class TCPIPNodeFactory
Default factory for simple initialisations using the TCPIPv4 protocol package.
Other constructors can be used to specify a particular CNS server. The default behaviour will extract a CNS server from the system property "org.jcsp.tcpip.DefaultCNSServer" with the server specified as a name or IP address with optional port number.
If built with 1.4 or higher the user preferences will also be checked but only if a runtime supporting the preferences is available. If not present the system preferences will then be checked.
Constructor Summary | |
---|---|
TCPIPNodeFactory()
Default constructor, connecting to the local host on the default CNS port or to a host name in the system properties. |
|
TCPIPNodeFactory(String cnsServer)
Connect to the named host on the default CNS port. |
|
TCPIPNodeFactory(String cnsServerAddress,
int cnsServerPort)
Connect to a named host on a specific port. |
Method Summary | |
---|---|
NodeKey |
initNode(Node node,
Node.Attributes attribs)
Initialise the node to listen on all local addresses, and start a CNS service. |
static NodeFactory |
instantiate()
Constructs an instance of this class. |
void |
setLocalPort(int port)
Sets the port number that should be used. |
void |
setSecurityAuthority(SecurityService security)
Sets the security service to be used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TCPIPNodeFactory()
public TCPIPNodeFactory(String cnsServer)
null
then the CNS service will not be loaded.
cnsServer
- name of serverpublic TCPIPNodeFactory(String cnsServerAddress, int cnsServerPort)
cnsServerAddress
- name of the servercnsServerPort
- port to connect toMethod Detail |
---|
public static NodeFactory instantiate()
public NodeKey initNode(Node node, Node.Attributes attribs) throws NodeInitFailedException
initNode
in interface NodeFactory
node
- the node to be initializedattribs
- access to the restricted node attributes
NodeInitFailedException
- if a problem occurspublic void setLocalPort(int port)
port
- the port number, 0 <= port < 65536.public void setSecurityAuthority(SecurityService security)
security
- the new security authority.
|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |