dsto.dfc.test
Class AbstractProtocol
java.lang.Object
dsto.dfc.databeans.AbstractDataObject
dsto.dfc.databeans.AbstractDataBean
dsto.dfc.databeans.DataBean
dsto.dfc.test.AbstractProtocol
- All Implemented Interfaces:
- IDataBean, IDataObject, IDataObjectChildListener, Cloneable
public abstract class AbstractProtocol
- extends DataBean
A protocol framework to be used with ProtocolServer
.
- Version:
- $Revision$
- Author:
- WeberD
Method Summary |
protected String |
getResponse()
Gets the most recent response of the protocol. |
abstract String |
getSignOffMessage()
Gets the sign-off message of this protocol. |
boolean |
isSigningOff()
Returns true if the last response of this protocol is to sign off from the
exchange. |
abstract String |
processInput(String inputLine)
This method is called for the protocol to respond to a given line of input,
inputLine . |
protected void |
setResponse(String message)
Sets the message for the protocol to respond with. |
Methods inherited from class dsto.dfc.databeans.AbstractDataObject |
addFirstPropertyListener, addPropertyListener, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, getBeanValue, getBooleanValue, getBooleanValue, getCharValue, getCharValue, getDoubleValue, getDoubleValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getObjectValue, getPropertyListeners, getShortValue, getStringValue, registerValue, removePropertyListener, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, unregisterValue |
Methods inherited from interface dsto.dfc.databeans.IDataBean |
getBeanValue, getBooleanValue, getCharValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getObjectValue, getStringValue, setValue, setValue, setValue, setValue, setValue, setValue |
AbstractProtocol
public AbstractProtocol()
isSigningOff
public boolean isSigningOff()
- Returns true if the last response of this protocol is to sign off from the
exchange.
- Returns:
- A boolean representing the state of the message exchange.
getSignOffMessage
public abstract String getSignOffMessage()
- Gets the sign-off message of this protocol.
- Returns:
- The sign-off message of this protocol as a String.
processInput
public abstract String processInput(String inputLine)
- This method is called for the protocol to respond to a given line of input,
inputLine
.
- Parameters:
inputLine
- The line of input to respond to.
- Returns:
- The protocol's response to
inputLine
.
setResponse
protected void setResponse(String message)
- Sets the message for the protocol to respond with.
- Parameters:
message
- The message to set as the protocol's response.
getResponse
protected String getResponse()
- Gets the most recent response of the protocol.
- Returns:
- Returns the last message set for the protocol to respond with.
Copyright © 2008 Commonwealth of Australia