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 One2OneChannel
chanFromServer
private Any2OneChannel
chanSynch
private One2OneChannel
chanToServer
private AltingConnectionServer
server
-
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 SharedAltingConnectionClient
client()
Returns theAltingConnectionClient
that can be used by a single process at any instance.AltingConnectionServer
server()
Returns theAltingConnectionServer
that 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 theAltingConnectionClient
that can be used by a single process at any instance.- Specified by:
client
in interfaceAny2OneConnection<T>
- Specified by:
client
in interfaceConnectionWithSharedAltingClient<T>
- Returns:
- the
AltingConnectionClient
object.
-
server
public AltingConnectionServer server()
Returns theAltingConnectionServer
that can be used by a single process at any instance.- Specified by:
server
in interfaceAny2OneConnection<T>
- Returns:
- the
AltingConnectionServer
object.
-
-