Class Any2AnyConnectionImpl<T>
java.lang.Object
org.jcsp.lang.AbstractConnectionImpl
org.jcsp.lang.Any2AnyConnectionImpl<T>
- All Implemented Interfaces:
Any2AnyConnection<T>, ConnectionWithSharedAltingClient<T>, ConnectionWithSharedAltingServer<T>
This class is an implementation of
Any2AnyConnection.
Each end is safe to be used by one thread at a time.-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractConnectionImpl
AbstractConnectionImpl.NonSingleRequestOpenMsg -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Any2OneChannel<T> private One2OneChannel<T> private Any2OneChannel<T> private One2OneChannel<T> Fields inherited from class 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
-
chanToServer
-
chanFromServer
-
chanClientSynch
-
chanServerSynch
-
-
Constructor Details
-
Any2AnyConnectionImpl
public Any2AnyConnectionImpl()Initializes all the attributes to necessary values. Channels are created using the static factory in theChannelServerinteface. Constructor for One2OneConnectionImpl.
-
-
Method Details
-
client
Returns aSharedAltingConnectionClientobject for this connection. This method can be called multiple times to return a newSharedAltingConnectionClientobject each time. Any object created can only be used by one process at a time but the set of objects constructed can be used concurrently.- Specified by:
clientin interfaceAny2AnyConnection<T>- Specified by:
clientin interfaceConnectionWithSharedAltingClient<T>- Returns:
- a new
SharedAltingConnectionClientobject.
-
server
Returns aSharedConnectionServerobject for this connection. This method can be called multiple times to return a newSharedConnectionServerobject each time. Any object created can only be used by one process at a time but the set of objects constructed can be used concurrently.- Specified by:
serverin interfaceAny2AnyConnection<T>- Specified by:
serverin interfaceConnectionWithSharedAltingServer<T>- Returns:
- a new
SharedConnectionServerobject.
-