Package org.jcsp.net
Class LinkFactory.Builder
java.lang.Object
org.jcsp.net.LinkFactory.Builder
- Enclosing class:
LinkFactory
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
ConstructorsConstructorDescriptionBuilder(ProtocolID protocolID) A constructor which takes theProtocolIDidentifying the protocol that thisBuildersupports. -
Method Summary
Modifier and TypeMethodDescriptionfinal ProtocolIDGets theProtocolIDthat thisBuildersupports.abstract LinktestAndBuild(NodeAddressID addressID) Takes aNodeAddressIDand constructs and returns aLinkobject.
-
Constructor Details
-
Builder
A constructor which takes theProtocolIDidentifying the protocol that thisBuildersupports. This must be called by sub-classes.- Parameters:
protocolID- theProtocolIDfor the protocol that the implementation supports.
-
-
Method Details
-
testAndBuild
Takes aNodeAddressIDand constructs and returns aLinkobject.- Parameters:
addressID- theAddressIDfor the remote Node.- Returns:
- the constructed
Link. - Throws:
IllegalArgumentException- if theAddressIDobject is invalid.
-
getProtocolID
Gets theProtocolIDthat thisBuildersupports.- Returns:
- the
ProtocolIDthat thisBuildersupports.
-