Package org.jcsp.net
Class NetSharedAltingConnectionClient
java.lang.Object
org.jcsp.lang.Guard
org.jcsp.lang.AltingConnectionClient
org.jcsp.lang.AltingConnectionClientImpl
org.jcsp.lang.SharedAltingConnectionClient
org.jcsp.net.NetSharedAltingConnectionClient
- All Implemented Interfaces:
ConnectionClient,SharedConnectionClient,NetSharedConnectionClient,Networked
public class NetSharedAltingConnectionClient
extends SharedAltingConnectionClient
implements NetSharedConnectionClient
Defines a class whose instances should be
that connect to a SharedAltingConnectionClientConnectionServer over a JCSP.NET
network.
Individual instances may not be used by multiple processes but
duplicate clients can be obtained by invoking
. These duplicates work over the
same connection and each one may be used by a different process.
duplicate()
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate NetChannelOutputprivate NetAltingChannelInputprivate NetChannelOutputprivate NetChannelOutputprivate NetConnectionLocationprivate Any2OneChannel -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNetSharedAltingConnectionClient(Any2OneChannel synchChan, NetAltingChannelInput fromServer, NetChannelOutput openToServer, NetChannelOutput reqToServer, NetChannelOutput backToClient) Constructor for NetSharedAltingConnectionClient. -
Method Summary
Modifier and TypeMethodDescription(package private) static NetSharedAltingConnectionClientcreate(NetChannelLocation serverLoc) voidDestroys this networked client object.Produces a duplicateNetSharedAltingConnectionClientobject which may be used by another process.Returns the address location of the connection server.Methods inherited from class org.jcsp.lang.SharedAltingConnectionClient
claim, releaseMethods inherited from class org.jcsp.lang.AltingConnectionClientImpl
isOpen, reply, requestMethods inherited from class org.jcsp.lang.AltingConnectionClient
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
-
synchChan
-
fromServer
-
openToServer
-
reqToServer
-
backToClient
-
serverLocation
-
-
Constructor Details
-
NetSharedAltingConnectionClient
protected NetSharedAltingConnectionClient(Any2OneChannel synchChan, NetAltingChannelInput fromServer, NetChannelOutput openToServer, NetChannelOutput reqToServer, NetChannelOutput backToClient) Constructor for NetSharedAltingConnectionClient.
- Parameters:
fromServer-backToClient-synchIn-toServer-synchOut-parent-
-
-
Method Details
-
create
-
getChannelLocation
Returns the address location of the connection server.- Specified by:
getChannelLocationin interfaceNetworked- Returns:
- the
NetChannelLocationobject. - See Also:
-
duplicate
Produces a duplicate
NetSharedAltingConnectionClientobject which may be used by another process.- Specified by:
duplicatein interfaceSharedConnectionClient- Overrides:
duplicatein classSharedAltingConnectionClient- Returns:
- a new duplicate
SharedConnectionClientobject.
-
destroyClient
public void destroyClient()Destroys this networked client object.
This frees any resources used within the JCSP.NET infrastructure.
-