|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jcsp.net.ProtocolID
public abstract class ProtocolID
Abstract class that identifies a protocol.
Provides methods for obtaining the protocol's Builder
to be
installed in the LinkFactory, starting a LinkServer
for this
protocol and for creating a NodeAddressID
for this protocol
from a String.
Protocols must not make use of the NodeID so that protocols can be installed before the node ID is determined. The current definition of TCPIPv4 protocol meets this criteria. Such a change will allow the UIFactory or other initialisation details to be obtained from a central server.
Constructor Summary | |
---|---|
ProtocolID()
|
Method Summary | |
---|---|
protected abstract NodeAddressID |
createAddressID(String stAddressID,
boolean uniqueAddress)
Constructs a NodeAddressID from a String . |
boolean |
equals(Object o)
This tests whether another object is equal to this object. |
protected abstract LinkFactory.Builder |
getLinkBuilder(Hashtable settings)
Obtains the Builder for this protocol. |
int |
getPosition()
Gets the position of this protocol in the order of preference. |
int |
hashCode()
Returns a hash code for this object. |
abstract boolean |
isActive()
Not currently used. |
abstract boolean |
requiresUserInteraction()
Returns whether the protocol requires user interaction in order for data to be delivered. |
protected abstract LinkServer |
startLinkServer(NodeAddressID addressID)
Constructs, starts and returns a LinkServer on a
specified NodeAddressID . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProtocolID()
Method Detail |
---|
public boolean equals(Object o)
ProtocolID
objects are equal if their classes are the same.
This is a default implementation, it is probably more efficient to
override this with an implementation that uses the instanceof operator.
equals
in class Object
o
- an object to compare with this object.
true
iff the supplied object's class is the same as
the class of this object.public final int hashCode()
hashCode
in class Object
public abstract boolean isActive()
Not currently used.
This is envisaged to be used if a protocol that is in use and needs to be removed sometime in the future. This will stop any further use of the protocol.
public abstract boolean requiresUserInteraction()
Returns whether the protocol requires user interaction in order for data to be delivered. There could be a protocol that writes data out to floppy disk or CD-R (see Tanenbaum's example of bandwidth and lorry!).
public final int getPosition()
int
.protected abstract LinkFactory.Builder getLinkBuilder(Hashtable settings)
settings
- Hashtable
containing settings.
Builder
for constructing Links.protected abstract LinkServer startLinkServer(NodeAddressID addressID) throws IllegalArgumentException
Constructs, starts and returns a LinkServer
on a
specified NodeAddressID
.
addressID
- The address for the server to listen on.
LinkServer
IllegalArgumentException
- if the supplied NodeAddressID
is invalid.protected abstract NodeAddressID createAddressID(String stAddressID, boolean uniqueAddress) throws IllegalArgumentException
NodeAddressID
from a String
.
stAddressID
- The address in String form.uniqueAddress
- boolean indicating whether address is unique.
NodeAddressID
IllegalArgumentException
- if the String
supplied is invalid.
|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |