Package org.jcsp.net.tcpip
Class TCPIPProtocolID
java.lang.Object
org.jcsp.net.ProtocolID
org.jcsp.net.tcpip.TCPIPProtocolID
- All Implemented Interfaces:
Serializable
Defines a protocol ID for the TCP/IP link implementation.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NodeAddressIDcreateAddressID(String stAddressID, boolean uniqueAddress) Creates an address from a string form.booleanCompares two protocol IDsprotected LinkFactory.BuildergetLinkBuilder(Hashtable settings) Returns the factory builder for this protocol.booleanisActive()Always returns true.booleanAlways returns false.protected LinkServerstartLinkServer(NodeAddressID addressID) Starts the TCP/IP link server at this node using the given address ID.Methods inherited from class org.jcsp.net.ProtocolID
getPosition, hashCode
-
Constructor Details
-
TCPIPProtocolID
public TCPIPProtocolID()
-
-
Method Details
-
equals
Compares two protocol IDs- Overrides:
equalsin classProtocolID- Parameters:
o- an object to compare with this object.- Returns:
trueiff the supplied object's class is the same as the class of this object.
-
isActive
public boolean isActive()Always returns true.- Specified by:
isActivein classProtocolID- Returns:
- boolean indicating whether protocol is active.
-
requiresUserInteraction
public boolean requiresUserInteraction()Always returns false.- Specified by:
requiresUserInteractionin classProtocolID- Returns:
- boolean indicating whether user interaction is required.
-
getLinkBuilder
Returns the factory builder for this protocol.- Specified by:
getLinkBuilderin classProtocolID- Parameters:
settings-Hashtablecontaining settings.- Returns:
- the
Builderfor constructing Links.
-
startLinkServer
Starts the TCP/IP link server at this node using the given address ID.- Specified by:
startLinkServerin classProtocolID- Parameters:
addressID- The address for the server to listen on.- Returns:
- the constructed
LinkServer - Throws:
IllegalArgumentException- if the suppliedNodeAddressIDis invalid.
-
createAddressID
protected NodeAddressID createAddressID(String stAddressID, boolean uniqueAddress) throws IllegalArgumentException Creates an address from a string form.- Specified by:
createAddressIDin classProtocolID- Parameters:
stAddressID- The address in String form.uniqueAddress- boolean indicating whether address is unique.- Returns:
- the constructed
NodeAddressID - Throws:
IllegalArgumentException- if theStringsupplied is invalid.
-