Package adams.scripting.engine
Class AbstractScriptingEngineEnhancer
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.scripting.engine.AbstractScriptingEngine
-
- adams.scripting.engine.AbstractScriptingEngineEnhancer
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,Pausable,SizeOfHandler,Stoppable,StoppableWithFeedback,FlowContextHandler,RemoteScriptingEngine,RemoteCommandProcessorHandler,Serializable
- Direct Known Subclasses:
DefaultMainScriptingEngine,DefaultWorkerScriptingEngine,ForwardingScriptingEngine
public abstract class AbstractScriptingEngineEnhancer extends AbstractScriptingEngine
Ancestor for scripting engines that enhance a base one.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RemoteScriptingEnginem_ScriptingEnginethe base scripting engine to use.-
Fields inherited from class adams.scripting.engine.AbstractScriptingEngine
m_CommandHandler, m_CommandProcessor, m_FlowContext, m_Paused, m_PermissionHandler, m_RemoteScriptingEngineHandler, m_RequestHandler, m_ResponseHandler, m_Running, 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 AbstractScriptingEngineEnhancer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.protected StringdoExecute()Executes the scripting engine.voidexecuteJob(CallableWithResult<String> job)Executes the job.protected RemoteScriptingEnginegetDefaultScriptingEngine()Returns the default scripting engine.RemoteScriptingEnginegetScriptingEngine()Returns the scripting engine in use.voidpauseExecution()Pauses the execution.protected StringpreExecute()Hook method which gets called just before the base engine is executed.voidresumeExecution()Resumes the execution.StringscriptingEngineTipText()Returns the tip text for this property.voidsetScriptingEngine(RemoteScriptingEngine value)Sets the scripting engine to use.voidstopExecution()Stops the execution.-
Methods inherited from class adams.scripting.engine.AbstractScriptingEngine
commandProcessorTipText, execute, forCommandLine, forName, getCommandHandler, getCommandProcessor, getDefaultCommandHandler, getDefaultCommandProcessor, getDefaultPermissionHandler, getDefaultRequestHandler, getDefaultResponseHandler, getFlowContext, getPermissionHandler, getRemoteScriptingEngineHandler, getRequestHandler, getResponseHandler, initialize, isPaused, isRunning, isStopped, permissionHandlerTipText, requestHandlerTipText, responseHandlerTipText, runScriptingEngine, runScriptingEngine, setCommandHandler, setCommandProcessor, setFlowContext, setPermissionHandler, setRemoteScriptingEngineHandler, setRequestHandler, setResponseHandler
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, reset, 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.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_ScriptingEngine
protected RemoteScriptingEngine m_ScriptingEngine
the base scripting engine to use.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractScriptingEngine
-
getDefaultScriptingEngine
protected RemoteScriptingEngine getDefaultScriptingEngine()
Returns the default scripting engine.- Returns:
- the default
-
setScriptingEngine
public void setScriptingEngine(RemoteScriptingEngine value)
Sets the scripting engine to use.- Parameters:
value- the scripting engine
-
getScriptingEngine
public RemoteScriptingEngine getScriptingEngine()
Returns the scripting engine in use.- Returns:
- the scripting engine
-
scriptingEngineTipText
public String scriptingEngineTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
preExecute
protected String preExecute()
Hook method which gets called just before the base engine is executed.
Default implementation does nothing.- Returns:
- null if successful, otherwise error message
-
doExecute
protected String doExecute()
Executes the scripting engine.- Specified by:
doExecutein classAbstractScriptingEngine- Returns:
- error message in case of failure to start up or run, otherwise null
-
executeJob
public void executeJob(CallableWithResult<String> job)
Executes the job.- Specified by:
executeJobin interfaceRemoteScriptingEngine- Overrides:
executeJobin classAbstractScriptingEngine- Parameters:
job- the job to execute
-
pauseExecution
public void pauseExecution()
Pauses the execution.- Specified by:
pauseExecutionin interfacePausable- Overrides:
pauseExecutionin classAbstractScriptingEngine
-
resumeExecution
public void resumeExecution()
Resumes the execution.- Specified by:
resumeExecutionin interfacePausable- Overrides:
resumeExecutionin classAbstractScriptingEngine
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecutionin interfaceStoppable- Overrides:
stopExecutionin classAbstractScriptingEngine
-
-