CSP for Java
(JCSP) 1.1-rc4

org.jcsp.net
Class LinkFactory.Builder

java.lang.Object
  extended by org.jcsp.net.LinkFactory.Builder
Enclosing class:
LinkFactory

public abstract static class LinkFactory.Builder
extends Object

An abstract inner class which should be implemented by comunication protocol implementations. The Builder class provides an abstract method which should be implemented to take a NodeAddressID object which should be used to construct a Link which is then returned by the method to the factory.


Constructor Summary
LinkFactory.Builder(ProtocolID protocolID)
          A constructor which takes the ProtocolID identifying the protocol that this Builder supports.
 
Method Summary
 ProtocolID getProtocolID()
          Gets the ProtocolID that this Builder supports.
abstract  Link testAndBuild(NodeAddressID addressID)
          Takes a NodeAddressID and constructs and returns a Link object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkFactory.Builder

public LinkFactory.Builder(ProtocolID protocolID)
A constructor which takes the ProtocolID identifying the protocol that this Builder supports. This must be called by sub-classes.

Parameters:
protocolID - the ProtocolID for the protocol that the implementation supports.
Method Detail

testAndBuild

public abstract Link testAndBuild(NodeAddressID addressID)
                           throws IllegalArgumentException
Takes a NodeAddressID and constructs and returns a Link object.

Parameters:
addressID - the AddressID for the remote Node.
Returns:
the constructed Link.
Throws:
IllegalArgumentException - if the AddressID object is invalid.

getProtocolID

public final ProtocolID getProtocolID()
Gets the ProtocolID that this Builder supports.

Returns:
the ProtocolID that this Builder supports.

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.