Package adams.scripting.command.basic
Class Text
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,RemoteFileWriter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,FlowContextHandler,FlowAwareRemoteCommand,RemoteCommand,Serializable
public class Text extends AbstractFlowAwareCommand implements RemoteFileWriter
Just sends some text.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_Payloadthe actual payload.protected PlaceholderFilem_RemoteFilethe remote file to save it to.protected BaseTextm_Textthe text to send.-
Fields inherited from class adams.scripting.command.AbstractFlowAwareCommand
m_FlowContext
-
Fields inherited from class adams.scripting.command.AbstractCommand
m_RemoteScriptingEngineHandler, m_Request
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.scripting.command.RemoteCommand
KEY_COMMAND, KEY_TYPE, VALUE_REQUEST, VALUE_RESPONSE
-
-
Constructor Summary
Constructors Constructor Description Text()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected StringdoHandleRequest(RemoteScriptingEngine engine, RemoteCommandProcessor processor)Handles the request.PlaceholderFilegetRemoteFile()Get remote file.byte[]getRequestPayload()Always zero-length array.Object[]getRequestPayloadObjects()Returns the objects that represent the request payload.BaseTextgetText()Returns the text to send.StringglobalInfo()Returns a string describing the object.protected voidprepareRequestPayload()Hook method for preparing the request payload,StringremoteFileTipText()Returns the tip text for this property.voidsetRemoteFile(PlaceholderFile value)Set remote file.voidsetRequestPayload(byte[] value)Ignored.voidsetText(BaseText value)Sets the text to send.StringtextTipText()Returns the tip text for this property.-
Methods inherited from class adams.scripting.command.AbstractFlowAwareCommand
getFlowContext, initialize, setFlowContext
-
Methods inherited from class adams.scripting.command.AbstractCommand
afterSendRequest, assembleRequest, assembleRequestHeader, beforeSendRequest, getRemoteScriptingEngineHandler, handleRequest, isRequest, parse, setRemoteScriptingEngineHandler, setRequest, toString
-
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
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.scripting.command.RemoteCommand
afterSendRequest, assembleRequest, beforeSendRequest, getRemoteScriptingEngineHandler, handleRequest, isRequest, parse, setRemoteScriptingEngineHandler, setRequest
-
-
-
-
Field Detail
-
m_Text
protected BaseText m_Text
the text to send.
-
m_RemoteFile
protected PlaceholderFile m_RemoteFile
the remote file to save it to.
-
m_Payload
protected String m_Payload
the actual payload.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setText
public void setText(BaseText value)
Sets the text to send.- Parameters:
value- the text
-
getText
public BaseText getText()
Returns the text to send.- Returns:
- the text
-
textTipText
public String textTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setRemoteFile
public void setRemoteFile(PlaceholderFile value)
Set remote file.- Specified by:
setRemoteFilein interfaceRemoteFileWriter- Parameters:
value- file
-
getRemoteFile
public PlaceholderFile getRemoteFile()
Get remote file.- Specified by:
getRemoteFilein interfaceRemoteFileWriter- Returns:
- file
-
remoteFileTipText
public String remoteFileTipText()
Returns the tip text for this property.- Specified by:
remoteFileTipTextin interfaceRemoteFileWriter- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRequestPayload
public void setRequestPayload(byte[] value)
Ignored.- Specified by:
setRequestPayloadin interfaceRemoteCommand- Parameters:
value- the payload
-
prepareRequestPayload
protected void prepareRequestPayload()
Hook method for preparing the request payload,- Overrides:
prepareRequestPayloadin classAbstractCommand
-
getRequestPayload
public byte[] getRequestPayload()
Always zero-length array.- Specified by:
getRequestPayloadin interfaceRemoteCommand- Returns:
- the payload
-
getRequestPayloadObjects
public Object[] getRequestPayloadObjects()
Returns the objects that represent the request payload.- Specified by:
getRequestPayloadObjectsin interfaceRemoteCommand- Returns:
- the objects
-
doHandleRequest
protected String doHandleRequest(RemoteScriptingEngine engine, RemoteCommandProcessor processor)
Handles the request.- Specified by:
doHandleRequestin classAbstractCommand- Parameters:
engine- the remote engine handling the requestprocessor- the processor for formatting/parsing- Returns:
- null if successful, otherwise error message
-
-