public abstract class AltingConnectionServer extends Guard
An interface to connection. This is used by servers which wish to ALT over a connection. Note that you cannot have more than one server serving an AltingConnectionServer.
Constructor and description |
---|
protected AltingConnectionServer
(AltingChannelInput altingChannel) Constructor. |
Type | Name and description |
---|---|
protected AltingChannelInput |
getAltingChannel() Returns the channel used to implement the Guard. |
boolean |
pending() Returns whether there is an open() pending on this connection. |
protected void |
setAltingChannel(AltingChannelInput chan) ConnectionServer implementations are likely to be
implemented over channels. |
Constructor. Note that this is only intended for use by JCSP, and should not be called by user processes. Users should use one of the subclasses.
altingChannel
- The channel used to implement the GuardReturns the channel used to implement the Guard. Note that this method is only intended for use by JCSP, and should not be called by user processes. Concrete subclasses should override this method to return null, to ensure that the alting channel is kept private.
Returns whether there is an open() pending on this connection.
Note: if there is, it won't go away until you accept it. But if there isn't, there may be one by the time you check the result of this method.
ConnectionServer
implementations are likely to be
implemented over channels. Multiple channels from the client
to server may be used; one could be used for the initial
connection while another one could be used for data requests.
This method allows sub-classes to specify which channel should
be the next one to be alted over.
chan the
- channel to be ALTed over.JCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk