adams.flow.core
Class AbstractJythonActor

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.flow.core.AbstractActor
              extended by adams.flow.core.AbstractScriptActor
                  extended by adams.flow.core.AbstractJythonActor
All Implemented Interfaces:
adams.core.AdditionalInformationHandler, adams.core.CleanUpHandler, adams.core.Debuggable, adams.core.DebugOutputHandler, adams.core.Destroyable, OptionHandler, adams.core.QuickInfoSupporter, adams.core.ShallowCopySupporter<AbstractActor>, adams.core.SizeOfHandler, adams.core.Stoppable, VariableChangeListener, Actor, ErrorHandler, Serializable, Comparable
Direct Known Subclasses:
Jython, Jython, Jython, Jython

public abstract class AbstractJythonActor
extends AbstractScriptActor

Abstract ancestor for actors that execute Jython scripts.

Version:
$Revision: 5352 $
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
Jython, Serialized Form

Field Summary
protected  AbstractActor m_ActorObject
          the loaded script object.
protected  JythonScript m_InlineScript
          the inline script.
 
Fields inherited from class adams.flow.core.AbstractScriptActor
m_ScriptFile, m_ScriptObject, m_ScriptOptions
 
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
 
Constructor Summary
AbstractJythonActor()
           
 
Method Summary
protected  String checkScriptObject()
          Checks the script object.
 void defineOptions()
          Adds options to the internal list of options.
protected  JythonScript getDefaultInlineScript()
          Returns the default inline script.
 JythonScript getInlineScript()
          Gets the inline script to use instead of the external script file.
 String getQuickInfo()
          Returns a quick info about the actor, which will be displayed in the GUI.
 String inlineScriptTipText()
          Returns the tip text for this property.
protected  String loadScriptObject()
          Loads the scripts object and sets its options.
 String scriptOptionsTipText()
          Returns the tip text for this property.
 void setInlineScript(JythonScript value)
          Sets the inline script to use instead of the external script file.
 String setUp()
          Initializes the item for flow execution.
 void wrapUp()
          Cleans up after the execution has finished.
 
Methods inherited from class adams.flow.core.AbstractScriptActor
getScriptFile, getScriptOptions, initScriptObject, scriptFileTipText, setScriptFile, setScriptOptions
 
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, debug, destroy, doExecute, equals, execute, findVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFullName, getName, getNextSibling, getParent, getPreviousSibling, getRoot, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, postExecute, preExecute, pruneBackup, pruneBackup, reset, restoreState, setAnnotations, setErrorHandler, setHeadless, setName, setParent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, globalInfo, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
 

Field Detail

m_ActorObject

protected transient AbstractActor m_ActorObject
the loaded script object.


m_InlineScript

protected JythonScript m_InlineScript
the inline script.

Constructor Detail

AbstractJythonActor

public AbstractJythonActor()
Method Detail

defineOptions

public void defineOptions()
Adds options to the internal list of options.

Specified by:
defineOptions in interface OptionHandler
Overrides:
defineOptions in class AbstractScriptActor

getQuickInfo

public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.

Specified by:
getQuickInfo in interface adams.core.QuickInfoSupporter
Specified by:
getQuickInfo in interface Actor
Overrides:
getQuickInfo in class AbstractScriptActor
Returns:
null if no info available, otherwise short string

scriptOptionsTipText

public String scriptOptionsTipText()
Returns the tip text for this property.

Overrides:
scriptOptionsTipText in class AbstractScriptActor
Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

getDefaultInlineScript

protected JythonScript getDefaultInlineScript()
Returns the default inline script.

Returns:
the default script

setInlineScript

public void setInlineScript(JythonScript value)
Sets the inline script to use instead of the external script file.

Parameters:
value - the inline script

getInlineScript

public JythonScript getInlineScript()
Gets the inline script to use instead of the external script file.

Returns:
the inline script

inlineScriptTipText

public String inlineScriptTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

loadScriptObject

protected String loadScriptObject()
Loads the scripts object and sets its options.

Specified by:
loadScriptObject in class AbstractScriptActor
Returns:
null if OK, otherwise the error message

checkScriptObject

protected String checkScriptObject()
Checks the script object.

Specified by:
checkScriptObject in class AbstractScriptActor
Returns:
null if OK, otherwise the error message

setUp

public String setUp()
Initializes the item for flow execution.

Specified by:
setUp in interface Actor
Overrides:
setUp in class AbstractScriptActor
Returns:
null if everything is fine, otherwise error message

wrapUp

public void wrapUp()
Cleans up after the execution has finished.

Specified by:
wrapUp in interface Actor
Overrides:
wrapUp in class AbstractScriptActor


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.