Package org.jcsp.net
Class NetAltingConnectionServer
- java.lang.Object
-
- org.jcsp.lang.Guard
-
- org.jcsp.lang.AltingConnectionServer<T>
-
- org.jcsp.lang.AltingConnectionServerImpl
-
- org.jcsp.net.NetAltingConnectionServer
-
- All Implemented Interfaces:
ConnectionServer,NetConnectionServer,Networked
class NetAltingConnectionServer extends AltingConnectionServerImpl implements NetConnectionServer
Instances of this class are
AltingConnectionServerobjects which allow connections fromConnectionClientobjects from over a JCSP.NET network.Instances of this class are not guaranteed to be safe to use by muliple concurrent processes. See
for a server class that may be used between multiple processes, however this may not be ALTed over.NetSharedConnectionServerInstances can be constructed by using a
or by using theNetConnectionFactoryclass.NetConnection
-
-
Field Summary
Fields Modifier and Type Field Description private NetAltingChannelInputchan-
Fields inherited from class org.jcsp.lang.AltingConnectionServerImpl
SERVER_STATE_CLOSED, SERVER_STATE_OPEN, SERVER_STATE_RECEIVED
-
Fields inherited from interface org.jcsp.lang.ConnectionServer
FACTORY
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNetAltingConnectionServer(NetAltingChannelInput chan)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static NetAltingConnectionServercreate()voiddestroyServer()Destroys the server and frees any resources used in the JCSP.NET infrastructure.NetChannelLocationgetChannelLocation()Returns the server's location.-
Methods inherited from class org.jcsp.lang.AltingConnectionServerImpl
getServerState, reply, reply, replyAndClose, request
-
Methods inherited from class org.jcsp.lang.AltingConnectionServer
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.ConnectionServer
reply, reply, replyAndClose, request
-
-
-
-
Field Detail
-
chan
private NetAltingChannelInput chan
-
-
Constructor Detail
-
NetAltingConnectionServer
private NetAltingConnectionServer(NetAltingChannelInput chan)
-
-
Method Detail
-
create
static NetAltingConnectionServer create()
-
getChannelLocation
public NetChannelLocation getChannelLocation()
Returns the server's location.- Specified by:
getChannelLocationin interfaceNetworked- Returns:
- the server's
NetChannelLocationobject.
-
destroyServer
public void destroyServer()
Destroys the server and frees any resources used in the JCSP.NET infrastructure.- Specified by:
destroyServerin interfaceNetConnectionServer
-
-