Package adams.flow.control
Class LocalScopeSubProcess
-
- All Implemented Interfaces:
AdditionalInformationHandler,CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,Pausable,QuickInfoSupporter,ShallowCopySupporter<Actor>,SizeOfHandler,Stoppable,StoppableWithFeedback,VariablesHandler,VariablesInspectionHandler,FlowPauseStateListener,VariableChangeListener,AtomicExecution,LocalScopeHandler,ProgrammaticLocalScope,ScopeHandler,StorageHandler,Actor,ActorHandler,ControlActor,ErrorHandler,Flushable,InputConsumer,MutableActorHandler,OutputProducer,StopRestrictor,SubFlowWrapUp,Serializable,Comparable
- Direct Known Subclasses:
LocalScopeTransformer
public class LocalScopeSubProcess extends AbstractControlActor implements InputConsumer, OutputProducer, MutableActorHandler, VariablesHandler, StorageHandler, LocalScopeHandler, ProgrammaticLocalScope, StopRestrictor, AtomicExecution
Provides a local scope for the sub-actors.
It is possible to 'propagate' or 'leak' variables and storage items from within the local scope back to the output scope. However, storage items from caches cannot be propagated.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-name <java.lang.String> (property: name) The name of the actor. default: LocalScopeTransformer
-annotation <adams.core.base.BaseAnnotation> (property: annotations) The annotations to attach to this actor. default:
-skip <boolean> (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is. default: false
-stop-flow-on-error <boolean> (property: stopFlowOnError) If set to true, the flow execution at this level gets stopped in case this actor encounters an error; the error gets propagated; useful for critical actors. default: false
-silent <boolean> (property: silent) If enabled, then no errors are output in the console; Note: the enclosing actor handler must have this enabled as well. default: false
-actor <adams.flow.core.Actor> [-actor ...] (property: actors) The actors to execute in the loop. default:
-scope-handling-variables <EMPTY|COPY|SHARE> (property: scopeHandlingVariables) Defines how variables are handled in the local scope; whether to start with empty set, a copy of the outer scope variables or share variables with the outer scope. default: EMPTY
-variables-filter <adams.core.base.BaseRegExp> (property: variablesFilter) The regular expression that variable names must match in order to get into the local scope (when using COPY). default: .*
-propagate-variables <boolean> (property: propagateVariables) If enabled and variables are not shared with outer scope, variables that match the specified regular expression get propagated to the outer scope. default: false
-variables-regexp <adams.core.base.BaseRegExp> (property: variablesRegExp) The regular expression that variable names must match in order to get propagated. default: .*
-scope-handling-storage <EMPTY|COPY|SHARE> (property: scopeHandlingStorage) Defines how storage is handled in the local scope; whether to start with empty set, a (deep) copy of the outer scope storage or share the storage with the outer scope. default: EMPTY
-storage-filter <adams.core.base.BaseRegExp> (property: storageFilter) The regular expression that storage item names must match in order to get into the local scope (when using COPY). default: .*
-propagate-storage <boolean> (property: propagateStorage) If enabled and storage is not shared with outer scope, storage items which names match the specified regular expression get propagated to the outer scope. default: false
-storage-regexp <adams.core.base.BaseRegExp> (property: storageRegExp) The regular expression that the names of storage items must match in order to get propagated. default: .*
-finish-before-stopping <boolean> (property: finishBeforeStopping) If enabled, actor first finishes processing all data before stopping. default: false
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface adams.flow.control.ScopeHandler
ScopeHandler.ScopeHandling
-
-
Field Summary
Fields Modifier and Type Field Description protected SubProcessm_Actorsthe actors to execute.protected CallableNamesRecorderm_CallableNamesthe callable names.protected booleanm_EnforceCallableNameCheckwhether the callable name check is enforced.protected Storagem_LocalStoragethe storage for temporary data.protected FlowVariablesm_LocalVariablesthe variables manager.protected booleanm_ProgrammaticLocalStoragewhether the local storage was programmatically set.protected booleanm_ProgrammaticLocalVariableswhether the local vars were programmatically set.protected booleanm_PropagateStoragewhether to propagate variables from the local scope to the outer scope.protected booleanm_PropagateVariableswhether to propagate variables from the local scope to the outer scope.protected booleanm_RestrictedStopwhether a restricted stop occurred.protected ScopeHandler.ScopeHandlingm_ScopeHandlingStoragehow to handle the storage.protected ScopeHandler.ScopeHandlingm_ScopeHandlingVariableshow to handle the variables.protected BaseRegExpm_StorageFilterthe regular expression of the storage items to allow into the local scope.protected BaseRegExpm_StorageRegExpthe regular expression of the variables to propagate.protected Longm_Synchronizefor synchronizing.protected BaseRegExpm_VariablesFilterthe regular expression of the variables to allow into the local scope.protected BaseRegExpm_VariablesRegExpthe regular expression of the variables to propagate.-
Fields inherited from class adams.flow.control.AbstractControlActor
m_Compatibility, m_PauseStateManager, m_SetUpSubActors
-
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
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.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Constructor Summary
Constructors Constructor Description LocalScopeSubProcess()Default constructor.LocalScopeSubProcess(String name)Initializes with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]accepts()Returns the class that the consumer accepts.StringactorsTipText()Returns the tip text for this property.Stringadd(int index, Actor actor)Inserts the actor at the given position.Stringadd(Actor actor)Inserts the actor at the end.StringaddCallableName(ActorHandler handler, Actor actor)Adds the callable name to the list of used ones.voidcleanUp()Cleans up after the execution has finished.TokencurrentInput()Returns the current input token, if any.voiddefineOptions()Adds options to the internal list of options.protected StringdoExecute()Executes the flow item.StringfinishBeforeStoppingTipText()Returns the tip text for this property.voidflushExecution()Stops the processing of tokens without stopping the flow.protected voidforceVariables(Variables value)Updates the Variables instance in use.Class[]generates()Returns the class of objects that it generates.Actorget(int index)Returns the actor at the given position.ActorHandlerInfogetActorHandlerInfo()Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.Actor[]getActors()Returns the actors of the loop.booleangetEnforceCallableNameCheck()Returns whether the check of callable names is enforced.booleangetFinishBeforeStopping()Returns whether to finish processing before stopping execution.VariablesgetLocalVariables()Returns the Variables instance to use.booleangetPropagateStorage()Returns whether to propagate storage items from the local to the outer scope.booleangetPropagateVariables()Returns whether to propagate variables from the local to the outer scope.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.ScopeHandler.ScopeHandlinggetScopeHandlingStorage()Returns how storage is handled in the local scope.ScopeHandler.ScopeHandlinggetScopeHandlingVariables()Returns how variables are handled in the local scope.intgetStoppingTimeout()Returns the timeout for waiting for the sub-flow to stop.intgetStoppingWarningInterval()Returns the interval for outputting warnings if the sub-flow hasn't stopped yet (and no stopping timeout set).StoragegetStorage()Returns the storage container.BaseRegExpgetStorageFilter()Returns the regular expression that storage item names must match to get into the local scope.BaseRegExpgetStorageRegExp()Returns the regular expression that storage item names must match to get propagated.VariablesgetVariables()Returns the Variables instance to use.BaseRegExpgetVariablesFilter()Returns the regular expression that variable names must match to get into the local scope.BaseRegExpgetVariablesRegExp()Returns the regular expression that variable names must match to get propagated.StringglobalInfo()Returns a string describing the object.booleanhasInput()Returns whether an input token is currently present.booleanhasPendingOutput()Checks whether there is pending output to be collected after executing the flow item.intindexOf(String actor)Returns the index of the actor.protected voidinitialize()Initializes the members.voidinput(Token token)Does nothing.booleanisCallableNameUsed(ActorHandler handler, Actor actor)Checks whether a callable name is already in use.booleanisRestrictedStop()Returns whether the stop was a restricted one (that can be resumed).booleanisRestrictingStops()Returns whether stops are being restricted.Tokenoutput()Returns the generated token.protected StringpostExecute()Post-execute hook.protected StringpreExecute()Pre-execute hook.StringpropagateStorageTipText()Returns the tip text for this property.StringpropagateVariablesTipText()Returns the tip text for this property.Actorremove(int index)Removes the actor at the given position and returns the removed object.voidremoveAll()Removes all actors.protected voidreset()Resets the actor.voidrestrictedStopExecution()Stops the (restricted) execution.voidrestrictedStopExecution(String msg)Stops the (restricted) execution.StringscopeHandlingStorageTipText()Returns the tip text for this property.StringscopeHandlingVariablesTipText()Returns the tip text for this property.Stringset(int index, Actor actor)Sets the actor at the given position.voidsetActors(Actor[] value)Sets the actors of the loop.voidsetEnforceCallableNameCheck(boolean value)Sets whether to enforce the callable name check.voidsetFinishBeforeStopping(boolean value)Sets whether to finish processing before stopping execution.voidsetLoggingLevel(LoggingLevel value)Sets the logging level.voidsetPropagateStorage(boolean value)Sets whether to propagate storage items from the local to the outer scope.voidsetPropagateVariables(boolean value)Sets whether to propagate variables from the local to the outer scope.voidsetScopeHandlingStorage(ScopeHandler.ScopeHandling value)Sets how to handle storage in the local scope.voidsetScopeHandlingVariables(ScopeHandler.ScopeHandling value)Sets how to handle variables into the local scope.voidsetSkip(boolean value)Sets whether the transformation is skipped or not.voidsetStoppingTimeout(int value)Sets the timeout for waiting for the sub-flow to stop.voidsetStoppingWarningInterval(int value)Sets the interval for outputting warnings if the sub-flow hasn't stopped yet (and no stopping timeout set).voidsetStorageFilter(BaseRegExp value)Sets the regular expression that storage item names must match to get into the local scope.voidsetStorageRegExp(BaseRegExp value)Sets the regular expression that storage item names must match to get propagated.protected StringsetUpSubActors()Gets called in the setUp() method.voidsetVariablesFilter(BaseRegExp value)Sets the regular expression that variable names must match to get into the local scope.voidsetVariablesRegExp(BaseRegExp value)Sets the regular expression that variable names must match to get propagated.intsize()Returns the size of the group.voidstopExecution()Stops the execution.StringstoppingTimeoutTipText()Returns the tip text for this property.StringstoppingWarningIntervalTipText()Returns the tip text for this property.StringstorageFilterTipText()Returns the tip text for this property.StringstorageRegExpTipText()Returns the tip text for this property.protected voidupdateParent()Updates the parent of all actors in this group.voiduseLocalStorage(Storage storage)The local storage to use.voiduseLocalVariables(Variables variables)The local variables to use.StringvariablesFilterTipText()Returns the tip text for this property.StringvariablesRegExpTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.control.AbstractControlActor
active, canInspectOptions, check, destroy, firstActive, firstInputConsumer, flowPauseStateChanged, isPaused, isSubFlowWrappedUp, lastActive, pauseExecution, resumeExecution, setParent, setUp, wrapUp, wrapUpSubFlow
-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canPerformSetUpCheck, compareTo, configureLogger, equals, execute, finalUpdateVariables, findVariables, findVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, handleError, handleException, hasErrorHandler, hasStopMessage, index, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, pruneBackup, pruneBackup, restoreState, setAnnotations, setErrorHandler, setName, setSilent, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.core.Actor
compareTo, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, toCommandLine, variableChanged, wrapUp
-
Methods inherited from interface adams.flow.core.ActorHandler
check, firstActive, lastActive
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
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
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Field Detail
-
m_Actors
protected SubProcess m_Actors
the actors to execute.
-
m_LocalStorage
protected transient Storage m_LocalStorage
the storage for temporary data.
-
m_LocalVariables
protected FlowVariables m_LocalVariables
the variables manager.
-
m_ProgrammaticLocalStorage
protected boolean m_ProgrammaticLocalStorage
whether the local storage was programmatically set.
-
m_ProgrammaticLocalVariables
protected boolean m_ProgrammaticLocalVariables
whether the local vars were programmatically set.
-
m_CallableNames
protected CallableNamesRecorder m_CallableNames
the callable names.
-
m_EnforceCallableNameCheck
protected boolean m_EnforceCallableNameCheck
whether the callable name check is enforced.
-
m_ScopeHandlingVariables
protected ScopeHandler.ScopeHandling m_ScopeHandlingVariables
how to handle the variables.
-
m_VariablesFilter
protected BaseRegExp m_VariablesFilter
the regular expression of the variables to allow into the local scope.
-
m_ScopeHandlingStorage
protected ScopeHandler.ScopeHandling m_ScopeHandlingStorage
how to handle the storage.
-
m_StorageFilter
protected BaseRegExp m_StorageFilter
the regular expression of the storage items to allow into the local scope.
-
m_PropagateVariables
protected boolean m_PropagateVariables
whether to propagate variables from the local scope to the outer scope.
-
m_VariablesRegExp
protected BaseRegExp m_VariablesRegExp
the regular expression of the variables to propagate.
-
m_PropagateStorage
protected boolean m_PropagateStorage
whether to propagate variables from the local scope to the outer scope.
-
m_StorageRegExp
protected BaseRegExp m_StorageRegExp
the regular expression of the variables to propagate.
-
m_RestrictedStop
protected boolean m_RestrictedStop
whether a restricted stop occurred.
-
m_Synchronize
protected final Long m_Synchronize
for synchronizing.
-
-
Constructor Detail
-
LocalScopeSubProcess
public LocalScopeSubProcess()
Default constructor.
-
LocalScopeSubProcess
public LocalScopeSubProcess(String name)
Initializes with the specified name.- Parameters:
name- the name to use
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractActor
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classAbstractControlActor
-
reset
protected void reset()
Resets the actor.- Overrides:
resetin classAbstractControlActor
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceActor- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractActor- Returns:
- null if no info available, otherwise short string
-
setLoggingLevel
public void setLoggingLevel(LoggingLevel value)
Sets the logging level.- Specified by:
setLoggingLevelin interfaceLoggingLevelHandler- Overrides:
setLoggingLevelin classAbstractOptionHandler- Parameters:
value- the level
-
setSkip
public void setSkip(boolean value)
Sets whether the transformation is skipped or not.- Specified by:
setSkipin interfaceActor- Overrides:
setSkipin classAbstractActor- Parameters:
value- true if transformation is to be skipped
-
setActors
public void setActors(Actor[] value)
Sets the actors of the loop.- Parameters:
value- the actors
-
getActors
public Actor[] getActors()
Returns the actors of the loop.- Returns:
- the actors
-
actorsTipText
public String actorsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setScopeHandlingVariables
public void setScopeHandlingVariables(ScopeHandler.ScopeHandling value)
Sets how to handle variables into the local scope.- Specified by:
setScopeHandlingVariablesin interfaceLocalScopeHandler- Parameters:
value- the scope handling
-
getScopeHandlingVariables
public ScopeHandler.ScopeHandling getScopeHandlingVariables()
Returns how variables are handled in the local scope.- Specified by:
getScopeHandlingVariablesin interfaceLocalScopeHandler- Returns:
- the scope handling
-
scopeHandlingVariablesTipText
public String scopeHandlingVariablesTipText()
Returns the tip text for this property.- Specified by:
scopeHandlingVariablesTipTextin interfaceLocalScopeHandler- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setVariablesFilter
public void setVariablesFilter(BaseRegExp value)
Sets the regular expression that variable names must match to get into the local scope.- Specified by:
setVariablesFilterin interfaceLocalScopeHandler- Parameters:
value- the expression
-
getVariablesFilter
public BaseRegExp getVariablesFilter()
Returns the regular expression that variable names must match to get into the local scope.- Specified by:
getVariablesFilterin interfaceLocalScopeHandler- Returns:
- the expression
-
variablesFilterTipText
public String variablesFilterTipText()
Returns the tip text for this property.- Specified by:
variablesFilterTipTextin interfaceLocalScopeHandler- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPropagateVariables
public void setPropagateVariables(boolean value)
Sets whether to propagate variables from the local to the outer scope.- Specified by:
setPropagateVariablesin interfaceLocalScopeHandler- Parameters:
value- if true then variables get propagated
-
getPropagateVariables
public boolean getPropagateVariables()
Returns whether to propagate variables from the local to the outer scope.- Specified by:
getPropagateVariablesin interfaceLocalScopeHandler- Returns:
- true if variables get propagated
-
propagateVariablesTipText
public String propagateVariablesTipText()
Returns the tip text for this property.- Specified by:
propagateVariablesTipTextin interfaceLocalScopeHandler- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setVariablesRegExp
public void setVariablesRegExp(BaseRegExp value)
Sets the regular expression that variable names must match to get propagated.- Specified by:
setVariablesRegExpin interfaceLocalScopeHandler- Parameters:
value- the expression
-
getVariablesRegExp
public BaseRegExp getVariablesRegExp()
Returns the regular expression that variable names must match to get propagated.- Specified by:
getVariablesRegExpin interfaceLocalScopeHandler- Returns:
- the expression
-
variablesRegExpTipText
public String variablesRegExpTipText()
Returns the tip text for this property.- Specified by:
variablesRegExpTipTextin interfaceLocalScopeHandler- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setScopeHandlingStorage
public void setScopeHandlingStorage(ScopeHandler.ScopeHandling value)
Sets how to handle storage in the local scope.- Specified by:
setScopeHandlingStoragein interfaceLocalScopeHandler- Parameters:
value- the scope handling
-
getScopeHandlingStorage
public ScopeHandler.ScopeHandling getScopeHandlingStorage()
Returns how storage is handled in the local scope.- Specified by:
getScopeHandlingStoragein interfaceLocalScopeHandler- Returns:
- the scope handling
-
scopeHandlingStorageTipText
public String scopeHandlingStorageTipText()
Returns the tip text for this property.- Specified by:
scopeHandlingStorageTipTextin interfaceLocalScopeHandler- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStorageFilter
public void setStorageFilter(BaseRegExp value)
Sets the regular expression that storage item names must match to get into the local scope.- Specified by:
setStorageFilterin interfaceLocalScopeHandler- Parameters:
value- the expression
-
getStorageFilter
public BaseRegExp getStorageFilter()
Returns the regular expression that storage item names must match to get into the local scope.- Specified by:
getStorageFilterin interfaceLocalScopeHandler- Returns:
- the expression
-
storageFilterTipText
public String storageFilterTipText()
Returns the tip text for this property.- Specified by:
storageFilterTipTextin interfaceLocalScopeHandler- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPropagateStorage
public void setPropagateStorage(boolean value)
Sets whether to propagate storage items from the local to the outer scope.- Specified by:
setPropagateStoragein interfaceLocalScopeHandler- Parameters:
value- if true then storage items get propagated
-
getPropagateStorage
public boolean getPropagateStorage()
Returns whether to propagate storage items from the local to the outer scope.- Specified by:
getPropagateStoragein interfaceLocalScopeHandler- Returns:
- true if storage items get propagated
-
propagateStorageTipText
public String propagateStorageTipText()
Returns the tip text for this property.- Specified by:
propagateStorageTipTextin interfaceLocalScopeHandler- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStorageRegExp
public void setStorageRegExp(BaseRegExp value)
Sets the regular expression that storage item names must match to get propagated.- Specified by:
setStorageRegExpin interfaceLocalScopeHandler- Parameters:
value- the expression
-
getStorageRegExp
public BaseRegExp getStorageRegExp()
Returns the regular expression that storage item names must match to get propagated.- Specified by:
getStorageRegExpin interfaceLocalScopeHandler- Returns:
- the expression
-
storageRegExpTipText
public String storageRegExpTipText()
Returns the tip text for this property.- Specified by:
storageRegExpTipTextin interfaceLocalScopeHandler- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFinishBeforeStopping
public void setFinishBeforeStopping(boolean value)
Sets whether to finish processing before stopping execution.- Specified by:
setFinishBeforeStoppingin interfaceAtomicExecution- Parameters:
value- if true then actor finishes processing first
-
getFinishBeforeStopping
public boolean getFinishBeforeStopping()
Returns whether to finish processing before stopping execution.- Specified by:
getFinishBeforeStoppingin interfaceAtomicExecution- Returns:
- true if actor finishes processing first
-
finishBeforeStoppingTipText
public String finishBeforeStoppingTipText()
Returns the tip text for this property.- Specified by:
finishBeforeStoppingTipTextin interfaceAtomicExecution- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStoppingTimeout
public void setStoppingTimeout(int value)
Sets the timeout for waiting for the sub-flow to stop.- Specified by:
setStoppingTimeoutin interfaceAtomicExecution- Parameters:
value- timeout in milliseconds (<= 0 for infinity)
-
getStoppingTimeout
public int getStoppingTimeout()
Returns the timeout for waiting for the sub-flow to stop.- Specified by:
getStoppingTimeoutin interfaceAtomicExecution- Returns:
- timeout in milliseconds (<= 0 for infinity)
-
stoppingTimeoutTipText
public String stoppingTimeoutTipText()
Returns the tip text for this property.- Specified by:
stoppingTimeoutTipTextin interfaceAtomicExecution- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStoppingWarningInterval
public void setStoppingWarningInterval(int value)
Sets the interval for outputting warnings if the sub-flow hasn't stopped yet (and no stopping timeout set).- Parameters:
value- interval in milliseconds (<= 0 no warning)
-
getStoppingWarningInterval
public int getStoppingWarningInterval()
Returns the interval for outputting warnings if the sub-flow hasn't stopped yet (and no stopping timeout set).- Returns:
- interval in milliseconds (<= 0 no warning)
-
stoppingWarningIntervalTipText
public String stoppingWarningIntervalTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setEnforceCallableNameCheck
public void setEnforceCallableNameCheck(boolean value)
Sets whether to enforce the callable name check.- Specified by:
setEnforceCallableNameCheckin interfaceScopeHandler- Parameters:
value- true if to enforce check
-
getEnforceCallableNameCheck
public boolean getEnforceCallableNameCheck()
Returns whether the check of callable names is enforced.- Specified by:
getEnforceCallableNameCheckin interfaceScopeHandler- Returns:
- true if check enforced
-
isCallableNameUsed
public boolean isCallableNameUsed(ActorHandler handler, Actor actor)
Checks whether a callable name is already in use.- Specified by:
isCallableNameUsedin interfaceScopeHandler- Parameters:
handler- the handler for the actoractor- the actor name to check- See Also:
getEnforceCallableNameCheck()
-
addCallableName
public String addCallableName(ActorHandler handler, Actor actor)
Adds the callable name to the list of used ones.- Specified by:
addCallableNamein interfaceScopeHandler- Parameters:
handler- the handler for the actoractor- the actor name to add- Returns:
- null if successfully added, otherwise error message
- See Also:
getEnforceCallableNameCheck()
-
useLocalVariables
public void useLocalVariables(Variables variables)
The local variables to use.- Specified by:
useLocalVariablesin interfaceProgrammaticLocalScope- Parameters:
variables- the variables
-
useLocalStorage
public void useLocalStorage(Storage storage)
The local storage to use.- Specified by:
useLocalStoragein interfaceProgrammaticLocalScope- Parameters:
storage- the storage
-
getStorage
public Storage getStorage()
Returns the storage container.- Specified by:
getStoragein interfaceStorageHandler- Returns:
- the container
-
getLocalVariables
public Variables getLocalVariables()
Returns the Variables instance to use.- Specified by:
getLocalVariablesin interfaceVariablesHandler- Returns:
- the local variables
-
getVariables
public Variables getVariables()
Returns the Variables instance to use.- Specified by:
getVariablesin interfaceActor- Overrides:
getVariablesin classAbstractActor- Returns:
- the scope handler
-
forceVariables
protected void forceVariables(Variables value)
Updates the Variables instance in use.- Overrides:
forceVariablesin classAbstractControlActor- Parameters:
value- ignored
-
updateParent
protected void updateParent()
Updates the parent of all actors in this group.- Overrides:
updateParentin classAbstractControlActor
-
size
public int size()
Returns the size of the group.- Specified by:
sizein interfaceActorHandler- Specified by:
sizein classAbstractControlActor- Returns:
- always 1
-
get
public Actor get(int index)
Returns the actor at the given position.- Specified by:
getin interfaceActorHandler- Specified by:
getin classAbstractControlActor- Parameters:
index- the position- Returns:
- the actor
-
set
public String set(int index, Actor actor)
Sets the actor at the given position.- Specified by:
setin interfaceActorHandler- Specified by:
setin classAbstractControlActor- Parameters:
index- the positionactor- the actor to set at this position- Returns:
- null if successful, otherwise error message
-
indexOf
public int indexOf(String actor)
Returns the index of the actor.- Specified by:
indexOfin interfaceActorHandler- Specified by:
indexOfin classAbstractControlActor- Parameters:
actor- the name of the actor to look for- Returns:
- the index of -1 if not found
-
add
public String add(Actor actor)
Inserts the actor at the end.- Specified by:
addin interfaceMutableActorHandler- Parameters:
actor- the actor to insert- Returns:
- null if successful, otherwise error message
-
add
public String add(int index, Actor actor)
Inserts the actor at the given position.- Specified by:
addin interfaceMutableActorHandler- Parameters:
index- the positionactor- the actor to insert- Returns:
- null if successful, otherwise error message
-
remove
public Actor remove(int index)
Removes the actor at the given position and returns the removed object.- Specified by:
removein interfaceMutableActorHandler- Parameters:
index- the position- Returns:
- the removed actor
-
removeAll
public void removeAll()
Removes all actors.- Specified by:
removeAllin interfaceMutableActorHandler
-
getActorHandlerInfo
public ActorHandlerInfo getActorHandlerInfo()
Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.- Specified by:
getActorHandlerInfoin interfaceActorHandler- Specified by:
getActorHandlerInfoin classAbstractControlActor- Returns:
- the info
-
accepts
public Class[] accepts()
Returns the class that the consumer accepts.- Specified by:
acceptsin interfaceInputConsumer- Returns:
- the Class of objects that can be processed
-
generates
public Class[] generates()
Returns the class of objects that it generates.- Specified by:
generatesin interfaceOutputProducer- Returns:
- the Class of the generated tokens
-
setUpSubActors
protected String setUpSubActors()
Gets called in the setUp() method. Returns null if loop-actors are fine, otherwise error message.- Overrides:
setUpSubActorsin classAbstractControlActor- Returns:
- null if everything OK, otherwise error message
-
input
public void input(Token token)
Does nothing.- Specified by:
inputin interfaceInputConsumer- Parameters:
token- the token to accept and process
-
hasInput
public boolean hasInput()
Returns whether an input token is currently present.- Specified by:
hasInputin interfaceInputConsumer- Returns:
- true if input token present
-
currentInput
public Token currentInput()
Returns the current input token, if any.- Specified by:
currentInputin interfaceInputConsumer- Returns:
- the input token, null if none present
-
isRestrictingStops
public boolean isRestrictingStops()
Returns whether stops are being restricted.- Specified by:
isRestrictingStopsin interfaceStopRestrictor- Returns:
- true if restricting stops
-
preExecute
protected String preExecute()
Pre-execute hook.- Overrides:
preExecutein classAbstractControlActor- Returns:
- null if everything is fine, otherwise error message
- See Also:
SubFlowWrapUp.wrapUpSubFlow()
-
doExecute
protected String doExecute()
Executes the flow item.- Specified by:
doExecutein classAbstractActor- Returns:
- null if everything is fine, otherwise error message
-
postExecute
protected String postExecute()
Post-execute hook.- Overrides:
postExecutein classAbstractActor- Returns:
- null if everything is fine, otherwise error message
- See Also:
AbstractActor.m_Executed
-
hasPendingOutput
public boolean hasPendingOutput()
Checks whether there is pending output to be collected after executing the flow item.- Specified by:
hasPendingOutputin interfaceOutputProducer- Returns:
- true if there is pending output
-
output
public Token output()
Returns the generated token.- Specified by:
outputin interfaceOutputProducer- Returns:
- the generated token
-
flushExecution
public void flushExecution()
Stops the processing of tokens without stopping the flow.- Specified by:
flushExecutionin interfaceActorHandler- Specified by:
flushExecutionin interfaceFlushable- Overrides:
flushExecutionin classAbstractControlActor
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecutionin interfaceActor- Specified by:
stopExecutionin interfaceStoppable- Overrides:
stopExecutionin classAbstractControlActor
-
isRestrictedStop
public boolean isRestrictedStop()
Returns whether the stop was a restricted one (that can be resumed).- Specified by:
isRestrictedStopin interfaceStopRestrictor- Returns:
- true if restricted stop occurred
-
restrictedStopExecution
public void restrictedStopExecution()
Stops the (restricted) execution. No message set.- Specified by:
restrictedStopExecutionin interfaceStopRestrictor
-
restrictedStopExecution
public void restrictedStopExecution(String msg)
Stops the (restricted) execution.- Specified by:
restrictedStopExecutionin interfaceStopRestrictor- Parameters:
msg- the message to set as reason for stopping, can be null
-
cleanUp
public void cleanUp()
Cleans up after the execution has finished. Also removes graphical components.- Specified by:
cleanUpin interfaceActor- Specified by:
cleanUpin interfaceCleanUpHandler- Overrides:
cleanUpin classAbstractControlActor
-
-