Package adams.core.command
Class AbstractAsyncCapableExternalCommandWithOptions
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.core.command.AbstractExternalCommand
-
- adams.core.command.AbstractAsyncCapableExternalCommand
-
- adams.core.command.AbstractAsyncCapableExternalCommandWithOptions
-
- All Implemented Interfaces:
CleanUpHandler,AsyncCapableExternalCommand,ExternalCommand,ExternalCommandWithOptions,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,Stoppable,StoppableWithFeedback,FlowContextHandler,Serializable
public abstract class AbstractAsyncCapableExternalCommandWithOptions extends AbstractAsyncCapableExternalCommand implements ExternalCommandWithOptions
Ancestor for commands that can be run in async mode that support options.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseString[]m_Optionsthe options for the command.protected BaseTextm_OptionsStringthe options as single string.-
Fields inherited from class adams.core.command.AbstractAsyncCapableExternalCommand
m_Blocking, m_ProcessOutput
-
Fields inherited from class adams.core.command.AbstractExternalCommand
m_Executed, m_FlowContext, m_LastCommand, m_Output, m_OutputFormatter, m_OutputType, m_Running, m_StdErrProcessor, m_StdOutProcessor, m_Stopped
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractAsyncCapableExternalCommandWithOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.String[]getActualOptions()Returns the actual options to use.BaseString[]getOptions()Returns the options for the command.BaseTextgetOptionsString()Returns the options for the command as single string.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.StringoptionsStringTipText()Returns the tip text for this property.StringoptionsTipText()Returns the tip text for this property.voidsetOptions(BaseString[] value)Sets the options for the command.voidsetOptions(String[] value)Sets the options for the command.voidsetOptions(List<String> value)Sets the options for the command.voidsetOptionsString(BaseText value)Sets the options for the command.voidsetOptionsString(String value)Sets the options for the command.-
Methods inherited from class adams.core.command.AbstractAsyncCapableExternalCommand
addStdErr, addStdOut, blockingTipText, doAsyncExecute, doBlockingExecute, getBlocking, getDefaultBlocking, isFinished, isUsingBlocking, setBlocking, stopExecution
-
Methods inherited from class adams.core.command.AbstractExternalCommand
addFormattedOutput, buildCommand, check, cleanUp, commandResultToError, execute, generates, getDefaultOutputFormatter, getDefaultOutputType, getDefaultStdErrProcessor, getDefaultStdOutProcessor, getFlowContext, getLastCommand, getOutputFormatter, getOutputType, getStdErrProcessor, getStdOutProcessor, hasLastCommand, hasOutput, initialize, isExecuted, isRunning, isStopped, log, log, log, output, outputFormatterTipText, outputTypeTipText, reset, setFlowContext, setOutputFormatter, setOutputType, setStdErrProcessor, setStdOutProcessor, stdErrProcessorTipText, stdOutProcessorTipText
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
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.command.ExternalCommand
addFormattedOutput, cleanUp, execute, generates, getLastCommand, getOutputFormatter, getOutputType, getStdErrProcessor, getStdOutProcessor, hasLastCommand, hasOutput, isExecuted, isFinished, isRunning, isUsingBlocking, output, outputFormatterTipText, outputTypeTipText, setOutputFormatter, setOutputType, setStdErrProcessor, setStdOutProcessor, stdErrProcessorTipText, stdOutProcessorTipText
-
Methods inherited from interface adams.flow.core.FlowContextHandler
getFlowContext, setFlowContext
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.core.Stoppable
stopExecution
-
Methods inherited from interface adams.core.StoppableWithFeedback
isStopped
-
-
-
-
Field Detail
-
m_Options
protected BaseString[] m_Options
the options for the command.
-
m_OptionsString
protected BaseText m_OptionsString
the options as single string.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractAsyncCapableExternalCommand
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractAsyncCapableExternalCommand- Returns:
- null if no info available, otherwise short string
-
setOptions
public void setOptions(List<String> value)
Sets the options for the command.- Specified by:
setOptionsin interfaceExternalCommandWithOptions- Parameters:
value- the options
-
setOptions
public void setOptions(String[] value)
Sets the options for the command.- Specified by:
setOptionsin interfaceExternalCommandWithOptions- Parameters:
value- the options
-
setOptions
public void setOptions(BaseString[] value)
Sets the options for the command.- Specified by:
setOptionsin interfaceExternalCommandWithOptions- Parameters:
value- the options
-
getOptions
public BaseString[] getOptions()
Returns the options for the command.- Specified by:
getOptionsin interfaceExternalCommandWithOptions- Returns:
- the options
-
optionsTipText
public String optionsTipText()
Returns the tip text for this property.- Specified by:
optionsTipTextin interfaceExternalCommandWithOptions- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOptionsString
public void setOptionsString(String value)
Sets the options for the command.- Specified by:
setOptionsStringin interfaceExternalCommandWithOptions- Parameters:
value- the options
-
setOptionsString
public void setOptionsString(BaseText value)
Sets the options for the command.- Specified by:
setOptionsStringin interfaceExternalCommandWithOptions- Parameters:
value- the options
-
getOptionsString
public BaseText getOptionsString()
Returns the options for the command as single string.- Specified by:
getOptionsStringin interfaceExternalCommandWithOptions- Returns:
- the options
-
optionsStringTipText
public String optionsStringTipText()
Returns the tip text for this property.- Specified by:
optionsStringTipTextin interfaceExternalCommandWithOptions- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getActualOptions
public String[] getActualOptions()
Returns the actual options to use. The options string takes precendence over the array.- Specified by:
getActualOptionsin interfaceExternalCommandWithOptions- Returns:
- the options
-
-