Provides a concrete implementation of the abstract NodeAddressID
for use with the
TCP/IP link protocol. A TCP/IP node address consists of an internet host address (IP address)
and 16bit IP port number.
Constructor and description |
---|
TCPIPAddressID
(InetAddress host, int port, boolean isUnique) Creates a TCPIPAddressID for a computer, given it's IP address and port number. |
TCPIPAddressID
(String host, int port, boolean isUnique) Creates a TCPIPAddressID for a computer, given it's host name and port number. |
Type | Name and description |
---|---|
boolean |
equals(Object obj) Compares two TCPIPAddressID for equality. |
static NodeAddressID |
getAddressIDFromString(String stringForm) Constructs and returns a TCPIPv4 NodeAddressID from a String. |
InetAddress |
getHost() Returns the computer's IP address |
int |
getPort() Returns the computer's port number for incoming link requests. |
ProtocolID |
getProtocolID() Returns the ProtocolID for this address |
protected String |
getStringForm() Returns a string representation of the address suitable for use in the createAddressID
method of TCPIPProtocolID . |
int |
hashCode() Returns a hashCode for this TCPIPAddressID |
boolean |
isGloballyUnique() |
String |
toString() Returns a string representation of this TCPIPAddressID, in the form "123.45.67.234:5678". |
Creates a TCPIPAddressID for a computer, given it's IP address and port number.
host
- The computer's IP address.port
- The computer's port number, in the range 0-65535 inclusive.isUnique
- True if the address ID is globally unique, false otherwise.Creates a TCPIPAddressID for a computer, given it's host name and port number.
host
- The computer's IP address, as a stringport
- The computer's port number.Compares two TCPIPAddressID for equality.
Constructs and returns a TCPIPv4 NodeAddressID from a String. The String MUST be in the form of that returned from the getStringForm method.
stringForm The
- String form representing a NodeAddressID.Returns the computer's IP address
Returns the computer's port number for incoming link requests.
Returns the ProtocolID for this address
Returns a string representation of the address suitable for use in the createAddressID
method of TCPIPProtocolID
.
Returns a hashCode for this TCPIPAddressID
Returns a string representation of this TCPIPAddressID, in the form "123.45.67.234:5678".
JCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk