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
AltingConnectionServer
objects which allow connections fromConnectionClient
objects 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.NetSharedConnectionServer
Instances can be constructed by using a
or by using theNetConnectionFactory
class.NetConnection
-
-
Field Summary
Fields Modifier and Type Field Description private NetAltingChannelInput
chan
-
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 private
NetAltingConnectionServer(NetAltingChannelInput chan)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static NetAltingConnectionServer
create()
void
destroyServer()
Destroys the server and frees any resources used in the JCSP.NET infrastructure.NetChannelLocation
getChannelLocation()
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:
getChannelLocation
in interfaceNetworked
- Returns:
- the server's
NetChannelLocation
object.
-
destroyServer
public void destroyServer()
Destroys the server and frees any resources used in the JCSP.NET infrastructure.- Specified by:
destroyServer
in interfaceNetConnectionServer
-
-