An abstract class that must be implemented by communication
protocol implementations. LinkServer
objects are
processes which listen on a certain address for connection
requests. When a request is received, a Link
should be spawned in
server mode.
Constructor and description |
---|
protected LinkServer
(ProtocolID protocolID, NodeAddressID linkServerAddressID) Constructor. |
Type | Name and description |
---|---|
protected static LinkServer |
create(NodeAddressID addressID) Create a server on a specifiedNodeAddressID, and start it. |
protected NodeAddressID |
getLinkServerAddressID() Protected accessor for obtaining the NodeAddressID on which
this server is listening. |
protected ProtocolID |
getProtocolID() Gets the protocol that this LinkServer supports. |
protected boolean |
stop() Stops the LinkServer. |
Constructor. A LinkServer must have an associated protocolID.
protocolID
- The ProtocolID
for the protocol that the concrete implementation of LinkServer
supports.linkServerAddressID
- the NodeAddressID
for this LinkServer
to listen on.Create a server on a specifiedNodeAddressID, and start it. The server is spawned off in parallel, so this call returns immediately. This needs to be implemented by the concrete implementation of this class. This is not enforced by the compiler due to this being a static method. This NEEDS to be overridden.
LinkServer
.addressID
- The NodeAddressID to accept from Protected accessor for obtaining the NodeAddressID
on which
this server is listening.
NodeAddressID
on which this server is listening.Gets the protocol that this LinkServer supports.
Stops the LinkServer. This NEEDS to be overridden.
true
iff the LinkServer
has stopped.JCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk