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.
Type | Name and description |
---|---|
protected 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 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. |
boolean |
isActive() |
boolean |
requiresUserInteraction() |
protected LinkServer |
startLinkServer(NodeAddressID addressID) |
Constructs a NodeAddressID
from a String
.
String
supplied is invalid.NodeAddressID
stAddressID
- The address in String form.uniqueAddress
- boolean indicating whether address is unique. This tests whether another object is equal to this object.
Two 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.
true
iff the supplied object's class is the same as
the class of this object.o
- an object to compare with this object.Obtains the Builder for this protocol. Provides a Hashtable that can can contain settings needed to construct the Link.
Builder
for constructing Links.settings Hashtable
- containing settings.Gets the position of this protocol in the order of preference.
int
.Returns a hash code for this object.
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.
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!).
Constructs, starts and returns a LinkServer
on a
specified NodeAddressID
.
NodeAddressID
is invalid.LinkServer
addressID
- The address for the server to listen on.