Package org.jcsp.lang
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 One2OneChannel
private Any2OneChannel
private One2OneChannel
private 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 theChannelServer
inteface. Constructor for One2OneConnectionImpl.
-
-
Method Details
-
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
Returns theAltingConnectionServer
that can be used by a single process at any instance.- Specified by:
server
in interfaceAny2OneConnection<T>
- Returns:
- the
AltingConnectionServer
object.
-