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.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(ProtocolID protocolID) A constructor which takes theProtocolID
identifying the protocol that thisBuilder
supports. -
Method Summary
Modifier and TypeMethodDescriptionfinal ProtocolID
Gets theProtocolID
that thisBuilder
supports.abstract Link
testAndBuild
(NodeAddressID addressID) Takes aNodeAddressID
and constructs and returns aLink
object.
-
Field Details
-
protocolID
-
-
Constructor Details
-
Builder
A constructor which takes theProtocolID
identifying the protocol that thisBuilder
supports. This must be called by sub-classes.- Parameters:
protocolID
- theProtocolID
for the protocol that the implementation supports.
-
-
Method Details
-
testAndBuild
Takes aNodeAddressID
and constructs and returns aLink
object.- Parameters:
addressID
- theAddressID
for the remote Node.- Returns:
- the constructed
Link
. - Throws:
IllegalArgumentException
- if theAddressID
object is invalid.
-
getProtocolID
Gets theProtocolID
that thisBuilder
supports.- Returns:
- the
ProtocolID
that thisBuilder
supports.
-