Package adams.scripting.command.flow
Class GetFlow
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,FileWriter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,RemoteCommand
,RemoteCommandOnFlow
,RemoteCommandWithErrorMessage
,RemoteCommandWithResponse
,Serializable
public class GetFlow extends AbstractRemoteCommandOnFlowWithResponse implements FileWriter
Retrieves a running/registered flow using its ID.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Actor
m_Flow
the flow.protected boolean
m_LoadFromDisk
whether to load the flow from disk.protected PlaceholderFile
m_OutputFile
the file to save the flow to.-
Fields inherited from class adams.scripting.command.AbstractRemoteCommandOnFlowWithResponse
m_ID
-
Fields inherited from class adams.scripting.command.AbstractCommandWithResponse
m_ErrorMessage, m_ResponseConnection
-
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 GetFlow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.boolean
getLoadFromDisk()
Returns whether to load the flow from disk rather than retrieve it from memory.PlaceholderFile
getOutputFile()
Get output file.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.String
globalInfo()
Returns a string describing the object.void
handleResponse(RemoteScriptingEngine engine, ResponseHandler handler)
Handles the response.String
IDTipText()
Returns the tip text for this property.protected void
initialize()
Initializes the members.String
loadFromDiskTipText()
Returns the tip text for this property.String
outputFileTipText()
Returns the tip text for this property.protected void
prepareResponsePayload()
Hook method for preparing the response payload,void
setLoadFromDisk(boolean value)
Sets whether to load the flow from disk rather than retrieve it from memory.void
setOutputFile(PlaceholderFile value)
Set output file.void
setRequestPayload(byte[] value)
Ignored.void
setResponsePayload(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, 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
-
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_LoadFromDisk
protected boolean m_LoadFromDisk
whether to load the flow from disk.
-
m_OutputFile
protected PlaceholderFile m_OutputFile
the file to save the flow to.
-
m_Flow
protected Actor m_Flow
the flow.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractRemoteCommandOnFlowWithResponse
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractCommand
-
IDTipText
public String IDTipText()
Returns the tip text for this property.- Specified by:
IDTipText
in interfaceRemoteCommandOnFlow
- Specified by:
IDTipText
in classAbstractRemoteCommandOnFlowWithResponse
- Returns:
- tip text for this property suitable for displaying in the gui
-
setLoadFromDisk
public void setLoadFromDisk(boolean value)
Sets whether to load the flow from disk rather than retrieve it from memory.- Parameters:
value
- true if to load from disk
-
getLoadFromDisk
public boolean getLoadFromDisk()
Returns whether to load the flow from disk rather than retrieve it from memory.- Returns:
- true if to load from disk
-
loadFromDiskTipText
public String loadFromDiskTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setOutputFile
public void setOutputFile(PlaceholderFile value)
Set output file.- Specified by:
setOutputFile
in interfaceFileWriter
- Parameters:
value
- file
-
getOutputFile
public PlaceholderFile getOutputFile()
Get output file.- Specified by:
getOutputFile
in interfaceFileWriter
- Returns:
- file
-
outputFileTipText
public String outputFileTipText()
Returns the tip text for this property.- Specified by:
outputFileTipText
in interfaceFileWriter
- 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:
setRequestPayload
in interfaceRemoteCommand
- Parameters:
value
- the payload
-
getRequestPayload
public byte[] getRequestPayload()
Always zero-length array.- Specified by:
getRequestPayload
in interfaceRemoteCommand
- Returns:
- the payload
-
getRequestPayloadObjects
public Object[] getRequestPayloadObjects()
Returns the objects that represent the request payload.- Specified by:
getRequestPayloadObjects
in interfaceRemoteCommand
- Returns:
- the objects
-
setResponsePayload
public void setResponsePayload(byte[] value)
Sets the payload for the response.- Specified by:
setResponsePayload
in interfaceRemoteCommandWithResponse
- Parameters:
value
- the payload
-
getResponsePayload
public byte[] getResponsePayload()
Returns the payload of the response, if any.- Specified by:
getResponsePayload
in interfaceRemoteCommandWithResponse
- Returns:
- the payload
-
prepareResponsePayload
protected void prepareResponsePayload()
Hook method for preparing the response payload,- Overrides:
prepareResponsePayload
in classAbstractCommandWithResponse
-
getResponsePayloadObjects
public Object[] getResponsePayloadObjects()
Returns the objects that represent the response payload.- Specified by:
getResponsePayloadObjects
in interfaceRemoteCommandWithResponse
- Returns:
- the objects
-
handleResponse
public void handleResponse(RemoteScriptingEngine engine, ResponseHandler handler)
Handles the response.- Specified by:
handleResponse
in interfaceRemoteCommandWithResponse
- Overrides:
handleResponse
in classAbstractCommandWithResponse
- Parameters:
engine
- the remote engine handling the responsehandler
- for handling the response
-
-