Package adams.scripting.command.basic
Class AbstractCommandWithFlowStopping
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.scripting.command.AbstractCommand
-
- adams.scripting.command.basic.AbstractCommandWithFlowStopping
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,RemoteCommand,Serializable
public abstract class AbstractCommandWithFlowStopping extends AbstractCommand
Ancestor for commands that stop flows.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_StopFlowswhether to stop all registered flows first.protected intm_TimeOutthe timeout period in msec for stopping a flow.-
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 AbstractCommandWithFlowStopping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcreateFlowID(int id, Flow flow)Generates a flow ID string.voiddefineOptions()Adds options to the internal list of options.booleangetStopFlows()Returns whether to stop registered flows first.intgetTimeOut()Returns the timeout period before considering a flow to be unresponsive.voidsetStopFlows(boolean value)Sets whether to stop registered flows first.voidsetTimeOut(int value)Sets the timeout period before considering a flow to be unresponsive.protected voidstopFlows()Stops the flows.StringstopFlowsTipText()Returns the tip text for this property.StringtimeOutTipText()Returns the tip text for this property.-
Methods inherited from class adams.scripting.command.AbstractCommand
afterSendRequest, assembleRequest, assembleRequestHeader, beforeSendRequest, doHandleRequest, getRemoteScriptingEngineHandler, handleRequest, initialize, isRequest, parse, prepareRequestPayload, setRemoteScriptingEngineHandler, setRequest, toString
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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
getRequestPayload, getRequestPayloadObjects, setRequestPayload
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setStopFlows
public void setStopFlows(boolean value)
Sets whether to stop registered flows first.- Parameters:
value- true if to stop flows first
-
getStopFlows
public boolean getStopFlows()
Returns whether to stop registered flows first.- Returns:
- true if to stop flows first
-
stopFlowsTipText
public String stopFlowsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
setTimeOut
public void setTimeOut(int value)
Sets the timeout period before considering a flow to be unresponsive.- Parameters:
value- the timeout in msec
-
getTimeOut
public int getTimeOut()
Returns the timeout period before considering a flow to be unresponsive.- Returns:
- the timeout in msec
-
timeOutTipText
public String timeOutTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
createFlowID
protected String createFlowID(int id, Flow flow)
Generates a flow ID string.- Parameters:
id- the registry IDflow- the flow- Returns:
- the ID string
-
stopFlows
protected void stopFlows()
Stops the flows.
-
-