Package org.jcsp.lang
Class SharedAltingConnectionClient<T>
java.lang.Object
org.jcsp.lang.Guard
org.jcsp.lang.AltingConnectionClient<T>
org.jcsp.lang.AltingConnectionClientImpl<T>
org.jcsp.lang.SharedAltingConnectionClient<T>
- All Implemented Interfaces:
ConnectionClient<T>,SharedConnectionClient<T>
- Direct Known Subclasses:
NetSharedAltingConnectionClient
public class SharedAltingConnectionClient<T>
extends AltingConnectionClientImpl<T>
implements SharedConnectionClient<T>
Implements a client end of a Connection which can have multiple client processes.
This object cannot itself be shared between concurrent processes
but duplicate objects can be generated that can be used by
multiple concurrent processes. This can be achieved using
the method.
duplicate()
The reply from the server can be ALTed over.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConnectionWithSharedAltingClientprivate ChannelInputprivate ChannelOutput -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSharedAltingConnectionClient(AltingChannelInput fromServer, ChannelInput synchIn, ChannelOutput openToServer, ChannelOutput reqToServer, SharedChannelOutput synchOut, ChannelOutput backToClient, ConnectionWithSharedAltingClient parent) -
Method Summary
Methods inherited from class org.jcsp.lang.AltingConnectionClientImpl
isOpen, reply, requestMethods inherited from class org.jcsp.lang.AltingConnectionClient
disable, enable, getAltingChannel, pending, setAltingChannelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jcsp.lang.ConnectionClient
isOpen, reply, request
-
Field Details
-
synchIn
-
synchOut
-
parent
-
-
Constructor Details
-
Method Details
-
claim
protected final void claim()Description copied from class:AltingConnectionClientImplThis claims a lock on the client. This implementation does nothing as instances of this class are only meant to be used with One2?Connection objects.- Overrides:
claimin classAltingConnectionClientImpl<T>
-
release
protected final void release()Description copied from class:AltingConnectionClientImplThis releases a lock on the client. This implementation does nothing as instances of this class are only meant to be used with One2?Connection objects.- Overrides:
releasein classAltingConnectionClientImpl<T>
-
duplicate
Returns a
SharedConnectionClientobject that is a duplicate of the object on which this method is called.This allows a process using a
SharedAltingConnectionClientobject to pass references to the connection client to multiple processes.The object returned can be cast into a
SharedConnectionClientobject.- Specified by:
duplicatein interfaceSharedConnectionClient<T>- Returns:
- a duplicate
SharedAltingConnectionClientobject.
-