dsto.dfc.test
Class AbstractProtocol

java.lang.Object
  extended by dsto.dfc.databeans.AbstractDataObject
      extended by dsto.dfc.databeans.AbstractDataBean
          extended by dsto.dfc.databeans.DataBean
              extended by 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

Field Summary
 
Fields inherited from class dsto.dfc.databeans.DataBean
alwaysTransient, transientProperties, typeInfo, values
 
Fields inherited from class dsto.dfc.databeans.AbstractDataObject
listeners
 
Fields inherited from interface dsto.dfc.databeans.IDataObject
OVERRIDE, PERSISTENT, PERSISTENT_OVERRIDE, TRANSIENT, TRANSIENT_OVERRIDE
 
Constructor Summary
AbstractProtocol()
           
 
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.DataBean
childPropertyChanged, getPropertyNames, getTypeInfo, getValue, isTransient, propertyIterator, setAlwaysTransient, setTypeInfo, setValue, shallowClone
 
Methods inherited from class dsto.dfc.databeans.AbstractDataBean
setValue, setValue, setValue, setValue, setValue, setValue, setValue
 
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface dsto.dfc.databeans.IDataBean
getBeanValue, getBooleanValue, getCharValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getObjectValue, getStringValue, setValue, setValue, setValue, setValue, setValue, setValue
 
Methods inherited from interface dsto.dfc.databeans.IDataObject
addPropertyListener, getPropertyListeners, removePropertyListener, setValue
 

Constructor Detail

AbstractProtocol

public AbstractProtocol()
Method Detail

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