Class Any2OneConnectionImpl<T>
java.lang.Object
org.jcsp.lang.Any2OneConnectionImpl<T>
- All Implemented Interfaces:
Any2OneConnection<T>, ConnectionWithSharedAltingClient<T>
This class is an implementation of
Any2OneConnection.
Each end is safe to be used by one thread at a time.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate One2OneChannelprivate Any2OneChannelprivate One2OneChannelprivate AltingConnectionServer -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
server
-
chanToServer
-
chanFromServer
-
chanSynch
-
-
Constructor Details
-
Any2OneConnectionImpl
public Any2OneConnectionImpl()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.- Specified by:
clientin interfaceAny2OneConnection<T>- Specified by:
clientin interfaceConnectionWithSharedAltingClient<T>- Returns:
- the
AltingConnectionClientobject.
-
server
Returns theAltingConnectionServerthat can be used by a single process at any instance.- Specified by:
serverin interfaceAny2OneConnection<T>- Returns:
- the
AltingConnectionServerobject.
-