public class SharedAltingConnectionClient extends AltingConnectionClientImpl implements SharedConnectionClient
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.
| Modifier | Constructor and Description |
|---|---|
protected |
SharedAltingConnectionClient(AltingChannelInput fromServer,
ChannelInput synchIn,
ChannelOutput openToServer,
ChannelOutput reqToServer,
SharedChannelOutput synchOut,
ChannelOutput backToClient,
org.jcsp.lang.ConnectionWithSharedAltingClient parent) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
claim()
This claims a lock on the client.
|
SharedConnectionClient |
duplicate()
Returns a
SharedConnectionClient object that is
a duplicate of the object on which this method is called. |
protected void |
release()
This releases a lock on the client.
|
isOpen, reply, requestgetAltingChannel, pending, setAltingChannelclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisOpen, reply, requestprotected SharedAltingConnectionClient(AltingChannelInput fromServer, ChannelInput synchIn, ChannelOutput openToServer, ChannelOutput reqToServer, SharedChannelOutput synchOut, ChannelOutput backToClient, org.jcsp.lang.ConnectionWithSharedAltingClient parent)
protected final void claim()
AltingConnectionClientImplclaim in class AltingConnectionClientImplprotected final void release()
AltingConnectionClientImplrelease in class AltingConnectionClientImplpublic SharedConnectionClient duplicate()
Returns a SharedConnectionClient object that is
a duplicate of the object on which this method is called.
This allows a process using a SharedAltingConnectionClient
object to pass references to the connection client to multiple
processes.
The object returned can be cast into a
SharedConnectionClient object.
duplicate in interface SharedConnectionClientSharedAltingConnectionClient object.Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.