public abstract class NodeAddress
This abstract class defines encapsulates the address of a Node within a JCSP networked system. Specific protocols must provide concrete implementations of this class to allow Node initialisation and connection. One concrete example is provided in the org.jcsp.net2.tcpip package.
Type | Name and description |
---|---|
int |
compareTo(Object arg0) Compares this NodeAddress to another |
protected Link |
createLink() Creates a Link connected to this address |
protected LinkServer |
createLinkServer() Creates a LinkServer listening on this address |
boolean |
equals(Object obj) Checks if this NodeAddress is equal to another |
String |
getAddress() Gets a string representing the address |
String |
getProtocol() Gets the string representing the protocol |
int |
hashCode() Gets the hash code of this object |
static NodeAddress |
parse(String str) Parses a string representation of a NodeAddress back to its object form |
String |
toString() Converts the NodeAddress into a String. |
String representation of the address
String representing the protocol in used
Compares this NodeAddress to another
arg0
- The NodeAddress to compare toCreates a Link connected to this address
Creates a LinkServer listening on this address
Checks if this NodeAddress is equal to another
obj
- The NodeAddress to compare toGets a string representing the address
Gets the string representing the protocol
Gets the hash code of this object
Parses a string representation of a NodeAddress back to its object form
str
- The string to parseConverts the NodeAddress into a String. The form is [protocol]\\[address]