Package org.jcsp.lang
Class One2OneConnectionImpl<T>
java.lang.Object
org.jcsp.lang.AbstractConnectionImpl
org.jcsp.lang.One2OneConnectionImpl<T>
- All Implemented Interfaces:
One2OneConnection<T>
This class is an implementation of
One2OneConnection.
Each end is safe to be used by one thread at a time.-
Nested Class Summary
Nested classes/interfaces inherited from class org.jcsp.lang.AbstractConnectionImpl
AbstractConnectionImpl.NonSingleRequestOpenMsg -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AltingConnectionClient<T> private AltingConnectionServer<T> Fields inherited from class org.jcsp.lang.AbstractConnectionImpl
CLIENT_STATE_CLOSED, CLIENT_STATE_MADE_REQ, CLIENT_STATE_OPEN, nonSingleRequestMsg, SERVER_STATE_CLOSED, SERVER_STATE_OPEN, SERVER_STATE_RECEIVED -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
client
-
server
-
-
Constructor Details
-
One2OneConnectionImpl
public One2OneConnectionImpl()Initializes all the attributes to necessary values. Channels are created using the static factory in theChannelServerinteface. Constructor for One2OneConnectionImpl.
-
-
Method Details
-
client
Returns theAltingConnectionClientthat can be used by a single process at any instance. This method will always return the sameAltingConnectionClientobject.One2OneConnectionis only intendended to have two ends.- Specified by:
clientin interfaceOne2OneConnection<T>- Returns:
- the
AltingConnectionClientobject.
-
server
Returns theAltingConnectionServerthat can be used by a single process at any instance. This method will always return the sameAltingConnectionServerobject.One2OneConnectionis only intendended to have two ends.- Specified by:
serverin interfaceOne2OneConnection<T>- Returns:
- the
AltingConnectionServerobject.
-