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 theChannelServer
inteface. Constructor for One2OneConnectionImpl.
-
-
Method Details
-
client
Returns theAltingConnectionClient
that can be used by a single process at any instance. This method will always return the sameAltingConnectionClient
object.One2OneConnection
is only intendended to have two ends.- Specified by:
client
in interfaceOne2OneConnection<T>
- Returns:
- the
AltingConnectionClient
object.
-
server
Returns theAltingConnectionServer
that can be used by a single process at any instance. This method will always return the sameAltingConnectionServer
object.One2OneConnection
is only intendended to have two ends.- Specified by:
server
in interfaceOne2OneConnection<T>
- Returns:
- the
AltingConnectionServer
object.
-