Package org.jcsp.lang
Class Any2OneConnectionImpl<T>
- java.lang.Object
-
- org.jcsp.lang.Any2OneConnectionImpl<T>
-
- All Implemented Interfaces:
Any2OneConnection<T>,ConnectionWithSharedAltingClient<T>
class Any2OneConnectionImpl<T> extends java.lang.Object implements Any2OneConnection<T>
This class is an implementation ofAny2OneConnection. Each end is safe to be used by one thread at a time.
-
-
Field Summary
Fields Modifier and Type Field Description private One2OneChannelchanFromServerprivate Any2OneChannelchanSynchprivate One2OneChannelchanToServerprivate AltingConnectionServerserver
-
Constructor Summary
Constructors Constructor Description Any2OneConnectionImpl()Initializes all the attributes to necessary values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SharedAltingConnectionClientclient()Returns theAltingConnectionClientthat can be used by a single process at any instance.AltingConnectionServerserver()Returns theAltingConnectionServerthat can be used by a single process at any instance.
-
-
-
Field Detail
-
server
private AltingConnectionServer server
-
chanToServer
private One2OneChannel chanToServer
-
chanFromServer
private One2OneChannel chanFromServer
-
chanSynch
private Any2OneChannel chanSynch
-
-
Method Detail
-
client
public SharedAltingConnectionClient 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
public AltingConnectionServer server()
Returns theAltingConnectionServerthat can be used by a single process at any instance.- Specified by:
serverin interfaceAny2OneConnection<T>- Returns:
- the
AltingConnectionServerobject.
-
-