CSP for Java
(JCSP) 1.1-rc4

org.jcsp.net.tcpip
Class TCPIPProtocolID

java.lang.Object
  extended by org.jcsp.net.ProtocolID
      extended by org.jcsp.net.tcpip.TCPIPProtocolID
All Implemented Interfaces:
Serializable

public class TCPIPProtocolID
extends ProtocolID

Defines a protocol ID for the TCP/IP link implementation.

Author:
Quickstone Technologies Limited
See Also:
ProtocolID, Serialized Form

Constructor Summary
TCPIPProtocolID()
           
 
Method Summary
protected  NodeAddressID createAddressID(String stAddressID, boolean uniqueAddress)
          Creates an address from a string form.
 boolean equals(Object o)
          Compares two protocol IDs
protected  LinkFactory.Builder getLinkBuilder(Hashtable settings)
          Returns the factory builder for this protocol.
 boolean isActive()
          Always returns true.
 boolean requiresUserInteraction()
          Always returns false.
protected  LinkServer startLinkServer(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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCPIPProtocolID

public TCPIPProtocolID()
Method Detail

equals

public boolean equals(Object o)
Compares two protocol IDs

Overrides:
equals in class ProtocolID
Parameters:
o - an object to compare with this object.
Returns:
true iff the supplied object's class is the same as the class of this object.

isActive

public boolean isActive()
Always returns true.

Specified by:
isActive in class ProtocolID
Returns:
boolean indicating whether protocol is active.

requiresUserInteraction

public boolean requiresUserInteraction()
Always returns false.

Specified by:
requiresUserInteraction in class ProtocolID
Returns:
boolean indicating whether user interaction is required.

getLinkBuilder

protected LinkFactory.Builder getLinkBuilder(Hashtable settings)
Returns the factory builder for this protocol.

Specified by:
getLinkBuilder in class ProtocolID
Parameters:
settings - Hashtable containing settings.
Returns:
the Builder for constructing Links.

startLinkServer

protected LinkServer startLinkServer(NodeAddressID addressID)
                              throws IllegalArgumentException
Starts the TCP/IP link server at this node using the given address ID.

Specified by:
startLinkServer in class ProtocolID
Parameters:
addressID - The address for the server to listen on.
Returns:
the constructed LinkServer
Throws:
IllegalArgumentException - if the supplied NodeAddressID is invalid.

createAddressID

protected NodeAddressID createAddressID(String stAddressID,
                                        boolean uniqueAddress)
                                 throws IllegalArgumentException
Creates an address from a string form.

Specified by:
createAddressID in class ProtocolID
Parameters:
stAddressID - The address in String form.
uniqueAddress - boolean indicating whether address is unique.
Returns:
the constructed NodeAddressID
Throws:
IllegalArgumentException - if the String supplied is invalid.

CSP for Java
(JCSP) 1.1-rc4

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.