Package adams.scripting.engine
Class MultiScriptingEngine
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.scripting.engine.AbstractScriptingEngine
-
- adams.scripting.engine.MultiScriptingEngine
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,Pausable
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,FlowContextHandler
,RemoteScriptingEngine
,RemoteCommandProcessorHandler
,Serializable
public class MultiScriptingEngine extends AbstractScriptingEngine
Manages multiple scripting engines.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RemoteScriptingEngine[]
m_Engines
the scripting engines 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 MultiScriptingEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEngine(RemoteScriptingEngine value)
Adds the scripting engine without resetting the scheme.void
defineOptions()
Adds options to the internal list of options.protected String
doExecute()
Executes the scripting engine.String
enginesTipText()
Returns the tip text for this property.RemoteScriptingEngine[]
getEngines()
Returns the engines in use.String
globalInfo()
Returns a string describing the object.void
pauseExecution()
Pauses the execution.void
removeEngine(RemoteScriptingEngine value)
Removes the scripting engine without resetting the scheme.void
resumeExecution()
Resumes the execution.void
setEngines(RemoteScriptingEngine[] value)
Sets the engines use.void
stopExecution()
Stops the execution.-
Methods inherited from class adams.scripting.engine.AbstractScriptingEngine
commandProcessorTipText, execute, executeJob, 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, 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_Engines
protected RemoteScriptingEngine[] m_Engines
the scripting engines to use.
-
-
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 classAbstractScriptingEngine
-
addEngine
public void addEngine(RemoteScriptingEngine value)
Adds the scripting engine without resetting the scheme. Does not start or stop the engine. Safe to call at runtime.- Parameters:
value
- the engine to add
-
removeEngine
public void removeEngine(RemoteScriptingEngine value)
Removes the scripting engine without resetting the scheme. Stops the engine. Safe to call at runtime.- Parameters:
value
- the engine to add
-
setEngines
public void setEngines(RemoteScriptingEngine[] value)
Sets the engines use.- Parameters:
value
- the engines
-
getEngines
public RemoteScriptingEngine[] getEngines()
Returns the engines in use.- Returns:
- the engines
-
enginesTipText
public String enginesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the gui
-
doExecute
protected String doExecute()
Executes the scripting engine.- Specified by:
doExecute
in classAbstractScriptingEngine
- Returns:
- error message in case of failure to start up or run, otherwise null
-
pauseExecution
public void pauseExecution()
Pauses the execution.- Specified by:
pauseExecution
in interfacePausable
- Overrides:
pauseExecution
in classAbstractScriptingEngine
-
resumeExecution
public void resumeExecution()
Resumes the execution.- Specified by:
resumeExecution
in interfacePausable
- Overrides:
resumeExecution
in classAbstractScriptingEngine
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecution
in interfaceStoppable
- Overrides:
stopExecution
in classAbstractScriptingEngine
-
-