A concrete implementation of a Link that operates over a TCP/IP based socket connection. For information on Link, see the relative documentation.
It is perfectly possible for a user to create a TCPIPLink without going through the standard LinkFactory approach, although this is not recommended. For example:
TCPIPLink link = new TCPIPLink(address);
link.connect();
link.registerLink();
new ProcessManager(link).start();
Can be achieved using the LinkFactory:
link = LinkFactory.getLink(address);
The LinkFactory will create and start the Link automatically if required.
Constructor and description |
---|
TCPIPLink
(TCPIPNodeAddress address) Creates a new TCPIPLink |
Type | Name and description |
---|---|
boolean |
connect() Connects the Link to the remote Node. |
protected boolean |
createResources() Creates any required resources. |
protected void |
destroyResources() Destroys any resources used by the Link |
NodeAddress |
getRemoteAddress() Gets the NodeAddress of the Node that this Link is connected to |
Methods inherited from class | Name |
---|---|
class Link |
connect, createResources, destroyResources, getRemoteNodeID, getTxChannel, lostLink, registerLink, run |
Creates a new TCPIPLink
address
- The address of the remote Node to connect toConnects the Link to the remote Node. Exchanges the NodeIDs
Creates any required resources. For TCP/IP there is none.
Destroys any resources used by the Link
Gets the NodeAddress of the Node that this Link is connected to
JCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk