Package adams.scripting.command.flow
Class SendRatControlCommand
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.scripting.command.AbstractCommand
-
- adams.scripting.command.AbstractCommandWithResponse
-
- adams.scripting.command.AbstractRemoteCommandOnFlowWithResponse
-
- adams.scripting.command.flow.SendRatControlCommand
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.SizeOfHandler,adams.scripting.command.RemoteCommand,adams.scripting.command.RemoteCommandOnFlow,adams.scripting.command.RemoteCommandWithErrorMessage,adams.scripting.command.RemoteCommandWithResponse,Serializable
public class SendRatControlCommand extends adams.scripting.command.AbstractRemoteCommandOnFlowWithResponseSends a control command for a Rat to a remote flow.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSendRatControlCommand.CommandEnumeration of available commands.
-
Field Summary
Fields Modifier and Type Field Description protected SendRatControlCommand.Commandm_Commandthe command.protected Stringm_Ratthe rat name.protected Stringm_Responsethe response.static StringRESPONSE_ALREADY_PAUSEDresponse: already paused.static StringRESPONSE_ALREADY_RUNNINGresponse: already running.static StringRESPONSE_ALREADY_STOPPEDresponse: already stopped.static StringRESPONSE_NO_SUPPORTEDresponse: command not supported.static StringRESPONSE_NOT_FOUNDresponse: rat not found.static StringRESPONSE_SUCCESSresponse: success.-
Fields inherited from class adams.scripting.command.AbstractCommandWithResponse
m_ErrorMessage, m_ResponseConnection
-
Fields inherited from class adams.scripting.command.AbstractCommand
m_RemoteScriptingEngineHandler, m_Request
-
-
Constructor Summary
Constructors Constructor Description SendRatControlCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcommandTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.SendRatControlCommand.CommandgetCommand()Returns the command to send.StringgetRat()Returns the full name of the Rat to send the command to.byte[]getRequestPayload()Always zero-length array.Object[]getRequestPayloadObjects()Returns the objects that represent the request payload.byte[]getResponsePayload()Returns the payload of the response, if any.Object[]getResponsePayloadObjects()Returns the objects that represent the response payload.StringglobalInfo()Returns a string describing the object.StringIDTipText()Returns the tip text for this property.protected voidinitialize()Initializes the members.protected voidprepareResponsePayload()Hook method for preparing the response payload,StringratTipText()Returns the tip text for this property.voidsetCommand(SendRatControlCommand.Command value)Sets the command to send.voidsetRat(String value)Sets the full name of the Rat to send the command to.voidsetRequestPayload(byte[] value)Ignored.voidsetResponsePayload(byte[] value)Sets the payload for the response.-
Methods inherited from class adams.scripting.command.AbstractRemoteCommandOnFlowWithResponse
getID, retrieveFlow, setID
-
Methods inherited from class adams.scripting.command.AbstractCommandWithResponse
afterSendResponse, assembleResponse, assembleResponseHeader, beforeSendResponse, doHandleRequest, getDefaultResponseConnection, getErrorMessage, getResponseConnection, handleResponse, hasErrorMessage, parse, responseConnectionTipText, setResponseConnection, toString
-
Methods inherited from class adams.scripting.command.AbstractCommand
afterSendRequest, assembleRequest, assembleRequestHeader, beforeSendRequest, getRemoteScriptingEngineHandler, handleRequest, isRequest, prepareRequestPayload, setRemoteScriptingEngineHandler, setRequest
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
RESPONSE_SUCCESS
public static final String RESPONSE_SUCCESS
response: success.- See Also:
- Constant Field Values
-
RESPONSE_NOT_FOUND
public static final String RESPONSE_NOT_FOUND
response: rat not found.- See Also:
- Constant Field Values
-
RESPONSE_NO_SUPPORTED
public static final String RESPONSE_NO_SUPPORTED
response: command not supported.- See Also:
- Constant Field Values
-
RESPONSE_ALREADY_PAUSED
public static final String RESPONSE_ALREADY_PAUSED
response: already paused.- See Also:
- Constant Field Values
-
RESPONSE_ALREADY_RUNNING
public static final String RESPONSE_ALREADY_RUNNING
response: already running.- See Also:
- Constant Field Values
-
RESPONSE_ALREADY_STOPPED
public static final String RESPONSE_ALREADY_STOPPED
response: already stopped.- See Also:
- Constant Field Values
-
m_Rat
protected String m_Rat
the rat name.
-
m_Command
protected SendRatControlCommand.Command m_Command
the command.
-
m_Response
protected String m_Response
the response.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.scripting.command.AbstractRemoteCommandOnFlowWithResponse
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classadams.scripting.command.AbstractCommand
-
IDTipText
public String IDTipText()
Returns the tip text for this property.- Specified by:
IDTipTextin interfaceadams.scripting.command.RemoteCommandOnFlow- Specified by:
IDTipTextin classadams.scripting.command.AbstractRemoteCommandOnFlowWithResponse- Returns:
- tip text for this property suitable for displaying in the gui
-
setRat
public void setRat(String value)
Sets the full name of the Rat to send the command to.- Parameters:
value- the full name
-
getRat
public String getRat()
Returns the full name of the Rat to send the command to.- Returns:
- the full name
-
ratTipText
public String ratTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setCommand
public void setCommand(SendRatControlCommand.Command value)
Sets the command to send.- Parameters:
value- the command
-
getCommand
public SendRatControlCommand.Command getCommand()
Returns the command to send.- Returns:
- the command
-
commandTipText
public String commandTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setRequestPayload
public void setRequestPayload(byte[] value)
Ignored.- Parameters:
value- the payload
-
getRequestPayload
public byte[] getRequestPayload()
Always zero-length array.- Returns:
- the payload
-
getRequestPayloadObjects
public Object[] getRequestPayloadObjects()
Returns the objects that represent the request payload.- Returns:
- the objects
-
setResponsePayload
public void setResponsePayload(byte[] value)
Sets the payload for the response.- Parameters:
value- the payload
-
getResponsePayload
public byte[] getResponsePayload()
Returns the payload of the response, if any.- Returns:
- the payload
-
prepareResponsePayload
protected void prepareResponsePayload()
Hook method for preparing the response payload,- Overrides:
prepareResponsePayloadin classadams.scripting.command.AbstractCommandWithResponse
-
getResponsePayloadObjects
public Object[] getResponsePayloadObjects()
Returns the objects that represent the response payload.- Returns:
- the objects
-
-