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 and description |
---|
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. |
Type | Name and description |
---|---|
NodeKey |
initNode(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. |
Default constructor, connecting to the local host on the default CNS port or to a host name in the system properties. The host name should be specified as name:port or just the host name to use the default CNS port.
Connect to the named host on the default CNS port. If the server name is given as null
then the CNS service will not be loaded.
cnsServer
- name of serverConnect to a named host on a specific port.
cnsServerAddress
- name of the servercnsServerPort
- port to connect toInitialise the node to listen on all local addresses, and start a CNS service.
node
- the node to be initializedattribs
- access to the restricted node attributesConstructs an instance of this class. This method is provided so that a later implementation can opt to pass construction to an alternative under certain conditions. This is for use by the infrastructure only. Users should call the public constructors.
Sets the port number that should be used. If this is not called then the system will allocate an arbitrary port.
port
- the port number, 0 <= port < 65536.Sets the security service to be used.
security
- the new security authority.JCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk