Package org.jcsp.net
Class NetAltingConnectionClient
- java.lang.Object
-
- org.jcsp.lang.Guard
-
- org.jcsp.lang.AltingConnectionClient<T>
-
- org.jcsp.lang.AltingConnectionClientImpl
-
- org.jcsp.net.NetAltingConnectionClient
-
- All Implemented Interfaces:
ConnectionClient,NetConnectionClient,Networked
public class NetAltingConnectionClient extends AltingConnectionClientImpl implements NetConnectionClient
Instances of this class are
AltingConnectionClientobjects which connect toConnectionServerobjects over a JCSP.NET network.Instances of this class are not guaranteed to be safe to use by muliple concurrent processes. See
.NetSharedAltingConnectionClientInstances can be constructed by using a
or by using theNetConnectionFactoryclass.NetConnection
-
-
Field Summary
Fields Modifier and Type Field Description private NetAltingChannelInputfromServerprivate NetConnectionLocationlocation
-
Constructor Summary
Constructors Constructor Description NetAltingConnectionClient(NetAltingChannelInput fromServer, NetChannelOutput openToServer, NetChannelOutput reqToServer, NetChannelOutput backToClient)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static NetAltingConnectionClientcreate(NetChannelLocation serverLoc)voiddestroyClient()Destroys the client and frees any resources used in the JCSP.NET infrastructure.NetChannelLocationgetChannelLocation()Returns the location of the server.-
Methods inherited from class org.jcsp.lang.AltingConnectionClientImpl
claim, isOpen, release, reply, request
-
Methods inherited from class org.jcsp.lang.AltingConnectionClient
getAltingChannel, pending, setAltingChannel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jcsp.lang.ConnectionClient
isOpen, reply, request
-
-
-
-
Field Detail
-
fromServer
private NetAltingChannelInput fromServer
-
location
private NetConnectionLocation location
-
-
Constructor Detail
-
NetAltingConnectionClient
NetAltingConnectionClient(NetAltingChannelInput fromServer, NetChannelOutput openToServer, NetChannelOutput reqToServer, NetChannelOutput backToClient)
-
-
Method Detail
-
create
static NetAltingConnectionClient create(NetChannelLocation serverLoc)
-
getChannelLocation
public NetChannelLocation getChannelLocation()
Returns the location of the server.- Specified by:
getChannelLocationin interfaceNetworked- Returns:
- the server's
NetChannelLocationobject.
-
destroyClient
public void destroyClient()
Destroys the client and frees any resources used in the JCSP.NET infrastructure.- Specified by:
destroyClientin interfaceNetConnectionClient
-
-