Package adams.flow.standalone
Class Rat
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.core.AbstractActor
-
- adams.flow.standalone.AbstractStandalone
-
- adams.flow.standalone.AbstractStandaloneGroupItem<Rats>
-
- adams.flow.standalone.Rat
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler,adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.Pausable,adams.core.QuickInfoSupporter,adams.core.ShallowCopySupporter<adams.flow.core.Actor>,adams.core.SizeOfHandler,adams.core.Stoppable,adams.core.StoppableWithFeedback,adams.core.VariablesInspectionHandler,adams.event.FlowPauseStateListener,adams.event.VariableChangeListener,adams.flow.control.AtomicExecution,adams.flow.core.Actor,adams.flow.core.ActorHandler,adams.flow.core.CallableActorUser,adams.flow.core.ErrorHandler,adams.flow.core.Flushable,adams.flow.core.LazySetupSupporter,adams.flow.core.MutableActorHandler,adams.flow.execution.debug.DebugScopeRestrictionHandler,adams.flow.standalone.StandaloneGroupItem<Rats>,Serializable,Comparable
- Direct Known Subclasses:
RatPlague
public class Rat extends adams.flow.standalone.AbstractStandaloneGroupItem<Rats> implements adams.flow.core.MutableActorHandler, adams.flow.core.CallableActorUser, adams.core.Pausable, adams.event.FlowPauseStateListener, adams.flow.execution.debug.DebugScopeRestrictionHandler, adams.flow.control.AtomicExecution, adams.flow.core.LazySetupSupporter
Defines a single reception/transmission setup.
-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: Rat
-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
-receiver <adams.flow.standalone.rats.input.RatInput> (property: receiver) The receiver to use. default: adams.flow.standalone.rats.input.DummyInput
-perform-lazy-setup <boolean> (property: performLazySetup) If enabled, initializing the sub-actors will only occurring the first time the rat gets executed (ie the input triggers); use with 'wrapUpAfterExecution' to save memory; gets disabled if actors contain a Breakpoint. default: false
-actor <adams.flow.core.Actor> [-actor ...] (property: actors) The actors for transforming the data obtained by the receiver before sending it to the transmitter. default:
-transmitter <adams.flow.standalone.rats.output.RatOutput> (property: transmitter) The transmitter to use. default: adams.flow.standalone.rats.output.DummyOutput
-log <adams.flow.core.CallableActorReference> (property: log) The name of the callable log actor to use (logging disabled if actor not found). default: unknown
-log-generator <adams.flow.standalone.rats.log.AbstractLogObjectGenerator> (property: logGenerator) The generator for turning the error message into the required log object. default: adams.flow.standalone.rats.log.LogEntryGenerator
-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
-propagate-variables <boolean> (property: propagateVariables) If enabled, 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: .* more: https://docs.oracle.com/javase/tutorial/essential/regex/ https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
-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
-propagate-storage <boolean> (property: propagateStorage) If enabled, 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: .* more: https://docs.oracle.com/javase/tutorial/essential/regex/ https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
-flow-error-queue <adams.flow.control.StorageName> (property: flowErrorQueue) The name of the (optional) queue in internal storage to feed with flow errors; Forwards the original data received as payload in an adams.flow.container.ErrorContainer alongside the error message. default: flowerrors
-send-error-queue <adams.flow.control.StorageName> (property: sendErrorQueue) The name of the (optional) queue in internal storage to feed with send errors; Forwards the original data received as payload in an adams.flow.container.ErrorContainer alongside the error message. default: senderrors
-suppress-errors <boolean> (property: suppressErrors) If enabled, errors are suppressed and only forwarded to the log actor. default: true
-show-in-control <boolean> (property: showInControl) If enabled, this Rat will be displayed in the adams.flow.standalone.RatControl control panel. default: false
-initial-state <PAUSED|RUNNING> (property: initialState) The initial state of the Rat actor. default: RUNNING
-mode <CONTINUOUS|MANUAL> (property: mode) The mode the Rat actor is run in. default: CONTINUOUS
-finish-before-stopping <boolean> (property: finishBeforeStopping) If enabled, actor first finishes processing all data before stopping. default: false
-stopping-timeout <int> (property: stoppingTimeout) The timeout in milliseconds when waiting for actors to finish (<= 0 for infinity; see 'finishBeforeStopping'). default: -1 minimum: -1
-wrapup-after-execution <boolean> (property: wrapUpAfterExecution) Whether to wrapUp the actors after execution to save memory; only available in conjunction with 'performLazySetup'. default: false
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_FLOWERRORSthe default flow errors queue name.static StringDEFAULT_LOGthe default log queue name.static StringDEFAULT_SENDERRORSthe default send errors queue name.protected adams.flow.control.LocalScopeSubProcessm_Actorsthe actors for transforming the data.protected booleanm_BreakpointPresentwhether a Breakpoint actor is part of the sub-flow.protected adams.flow.control.StorageNamem_FlowErrorQueuethe name of the (optional) queue in internal storage for sending flow error to.protected adams.flow.core.CallableActorHelperm_Helperthe helper class.protected RatStatem_InitialStatethe initial state.protected booleanm_LazySetupPeformedwhether lazy initialization has been performed.protected adams.flow.core.CallableActorReferencem_Logthe callable name.protected adams.flow.core.Actorm_LogActorthe callable log actor.protected AbstractLogObjectGeneratorm_LogGeneratorthe generator for the log objects.protected RatModem_Modethe mode.protected booleanm_PerformLazySetupwhether to perform lazy initialization of sub-actors.protected RatInputm_Receiverthe receiver to use.protected RatRunnablem_Runnablethe runnable doing the work.protected adams.flow.control.StorageNamem_SendErrorQueuethe name of the (optional) queue in internal storage for sending send error to.protected booleanm_ShowInControlwhether to show inRatControl.protected Set<RatStateListener>m_StateListenersthe state listeners.protected booleanm_Stoppingwhether the rat is currently being stopped.protected booleanm_SuppressErrorswhether errors a suppressed (only forwarded to log actor).protected RatOutputm_Transmitterthe transmitter to use.protected booleanm_WrapUpAfterExecutionwhether to wrap up after executing the actors.-
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
-
-
Constructor Summary
Constructors Constructor Description Rat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringactorsTipText()Returns the tip text for this property.Stringadd(int index, adams.flow.core.Actor actor)Inserts the actor at the given position.Stringadd(adams.flow.core.Actor actor)Inserts the actor at the end.voidaddRatStateListener(RatStateListener l)Adds the state listener.Stringcheck()Performs checks on the "sub-actors".voidcleanUp()Cleans up after the execution has finished.voiddefineOptions()Adds options to the internal list of options.protected StringdoExecute()Executes the flow item.protected adams.flow.core.ActorfindCallableActor()Tries to find the callable actor referenced by its callable name.StringfinishBeforeStoppingTipText()Returns the tip text for this property.adams.flow.core.ActorfirstActive()Returns the first non-skipped actor.StringflowErrorQueueTipText()Returns the tip text for this property.voidflowPauseStateChanged(adams.event.FlowPauseStateEvent e)Gets called when the pause state of the flow changes.voidflushExecution()Stops the processing of tokens without stopping the flow.protected voidforceVariables(adams.core.Variables value)Updates the Variables instance in use.adams.flow.core.Actorget(int index)Returns the actor at the given position.adams.flow.control.LocalScopeSubProcessgetActorHandler()Returns the handler of the actors.adams.flow.core.ActorHandlerInfogetActorHandlerInfo()Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.adams.flow.core.Actor[]getActors()Returns the flow items of this sequence.StringgetAdditionalInformation()Returns the additional information.adams.flow.core.ActorgetCallableActor()Returns the currently set callable actor.adams.flow.execution.debug.AbstractScopeRestrictiongetDebugScopeRestriction()Returns the scope restriction in place.adams.flow.execution.debug.AbstractScopeRestrictiongetDebugScopeRestriction(adams.gui.flow.tree.Node context)Returns the scope restriction in place.booleangetFinishBeforeStopping()Returns whether to finish processing before stopping execution.adams.flow.control.StorageNamegetFlowErrorQueue()Returns the name for the queue in internal storage to feed with flow errors.RatStategetInitialState()Returns the initial state of the Rat actor.adams.flow.control.LocalScopeSubProcessgetLocalScope()Returns the internal local scope transformer.adams.flow.core.CallableActorReferencegetLog()Returns the name of the callable log actor in use.AbstractLogObjectGeneratorgetLogGenerator()Returns the generator for turning error messages into log objects.RatModegetMode()Returns the mode the Rat is run in.booleangetPerformLazySetup()Returns whether to perform a lazy setup, ie when first executed.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.RatInputgetReceiver()Returns the receiver to use.adams.flow.control.ScopeHandler.ScopeHandlinggetScopeHandlingStorage()Returns how storage is handled in the local scope.adams.flow.control.ScopeHandler.ScopeHandlinggetScopeHandlingVariables()Returns how variables are handled in the local scope.adams.flow.control.StorageNamegetSendErrorQueue()Returns the name for the queue in internal storage to feed with send errors.booleangetShowInControl()Returns whether to show in RatControl.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).adams.core.base.BaseRegExpgetStorageRegExp()Returns the regular expression that storage item names must match to get propagated.booleangetSuppressErrors()Returns whether suppress errors and only forward them to the log actor.RatOutputgetTransmitter()Returns the transmitter to use.adams.core.base.BaseRegExpgetVariablesRegExp()Returns the regular expression that variable names must match to get propagated.booleangetWrapUpAfterExecution()Returns whether to wrap up the actors after execution.StringglobalInfo()Returns a string describing the object.StringhandleError(adams.flow.core.Actor source, String type, String msg)Handles the given error message with the flow that this actor belongs to, if the flow has error logging turned on.booleanhasCallableActor()Checks whether a reference to the callable actor is currently available.booleanhasLazySetupPerformed()Returns whether lazy setup has been performed.intindexOf(String actor)Returns the index of the actor.protected voidinitialize()Initializes the members.StringinitialStateTipText()Returns the tip text for this property.booleanisBreakpointPresent()Returns whether a breakpoint is present.booleanisPaused()Returns whether the object is currently paused.booleanisRunnableActive()Returns whwether the runnable is currently active.adams.flow.core.ActorlastActive()Returns the last non-skipped actor.StringlazySetup()Performs the lazy setup.voidlog(String msg, String id)Logs an error message if a valid callable log actor has been set up.StringlogGeneratorTipText()Returns the tip text for this property.StringlogTipText()Returns the tip text for this property.StringmodeTipText()Returns the tip text for this property.voidnotifyRatStateListeners()Notifies all the listeners.voidpauseExecution()Pauses the execution.StringperformLazySetupTipText()Returns the tip text for this property.protected StringperformVariableChecks()For performing variable checks.StringpropagateStorageTipText()Returns the tip text for this property.StringpropagateVariablesTipText()Returns the tip text for this property.booleanqueueFlowError(Object payload, String error)Creates anErrorContainerwith the provided data and puts it in them_FlowErrorQueue(if the queue is available).booleanqueueSendError(Object payload, String error)Creates anErrorContainerwith the provided data and puts it in them_SendErrorQueue(if the queue is available).StringreceiverTipText()Returns the tip text for this property.adams.flow.core.Actorremove(int index)Removes the actor at the given position and returns the removed object.voidremoveAll()Removes all actors.voidremoveRatStateListener(RatStateListener l)Removes the state listener.voidresumeExecution()Resumes the execution.StringscopeHandlingStorageTipText()Returns the tip text for this property.StringscopeHandlingVariablesTipText()Returns the tip text for this property.StringsendErrorQueueTipText()Returns the tip text for this property.Stringset(int index, adams.flow.core.Actor actor)Sets the actor at the given position.voidsetActors(adams.flow.core.Actor[] value)Sets the flow items for this sequence.voidsetErrorHandler(adams.flow.core.ErrorHandler value)Sets the error handler to use for handling errors in the flow.voidsetFinishBeforeStopping(boolean value)Sets whether to finish processing before stopping execution.voidsetFlowErrorQueue(adams.flow.control.StorageName value)Sets the name for the queue in internal storage to feed with flow errors.voidsetInitialState(RatState value)Sets the initial state of the Rat actor.voidsetLog(adams.flow.core.CallableActorReference value)Sets the name of the callable log actor to use.voidsetLogGenerator(AbstractLogObjectGenerator value)Sets the generator for turning error messages into log objects.voidsetLoggingLevel(adams.core.logging.LoggingLevel value)Sets the logging level.voidsetMode(RatMode value)Sets the mode the Rat is run in.voidsetParent(adams.flow.core.Actor value)Sets the parent of this actor, e.g., the group it belongs to.voidsetPerformLazySetup(boolean value)Sets whether to perform a lazy setup, ie when first executed.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.voidsetReceiver(RatInput value)Sets the receiver to use.voidsetScopeHandlingStorage(adams.flow.control.ScopeHandler.ScopeHandling value)Sets how to handle storage in the local scope.voidsetScopeHandlingVariables(adams.flow.control.ScopeHandler.ScopeHandling value)Sets how to handle variables into the local scope.voidsetSendErrorQueue(adams.flow.control.StorageName value)Sets the name for the queue in internal storage to feed with send errors.voidsetShowInControl(boolean value)Sets whether to show in RatControl.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).voidsetStorageRegExp(adams.core.base.BaseRegExp value)Sets the regular expression that storage item names must match to get propagated.voidsetSuppressErrors(boolean value)Sets whether to suppress errors and only forward them to the log actor.voidsetTransmitter(RatOutput value)Sets the transmitter to use.StringsetUp()Initializes the item for flow execution.voidsetVariablesRegExp(adams.core.base.BaseRegExp value)Sets the regular expression that variable names must match to get propagated.voidsetWrapUpAfterExecution(boolean value)Sets whether to wrap up the actors after execution.StringshowInControlTipText()Returns the tip text for this property.intsize()Returns the size of the group.StringstartRunnable()Starts the runnable.voidstopExecution()Stops the execution.protected voidstopIfNecessary()Stops the execution if necessary.StringstoppingTimeoutTipText()Returns the tip text for this property.StringstoppingWarningIntervalTipText()Returns the tip text for this property.voidstopRunnable()Stops the runnable.StringstorageRegExpTipText()Returns the tip text for this property.StringsuppressErrorsTipText()Returns the tip text for this property.StringtransmitterTipText()Returns the tip text for this property.StringvariablesRegExpTipText()Returns the tip text for this property.voidwrapUp()Cleans up after the execution has finished.StringwrapUpAfterExecutionTipText()Returns the tip text for this property.voidwrapUpRunnable()Nulls the runnable and notifies listeners.-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, backupState, canInspectOptions, canPerformSetUpCheck, compareTo, configureLogger, destroy, equals, execute, finalUpdateVariables, findVariables, findVariables, forCommandLine, forName, forName, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleException, hasErrorHandler, hasStopMessage, index, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, postExecute, pruneBackup, pruneBackup, reset, restoreState, setAnnotations, setName, setSilent, setSkip, 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, getVariables, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setName, setSilent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, toCommandLine, variableChanged
-
-
-
-
Field Detail
-
DEFAULT_LOG
public static final String DEFAULT_LOG
the default log queue name.- See Also:
- Constant Field Values
-
DEFAULT_FLOWERRORS
public static final String DEFAULT_FLOWERRORS
the default flow errors queue name.- See Also:
- Constant Field Values
-
DEFAULT_SENDERRORS
public static final String DEFAULT_SENDERRORS
the default send errors queue name.- See Also:
- Constant Field Values
-
m_PerformLazySetup
protected boolean m_PerformLazySetup
whether to perform lazy initialization of sub-actors.
-
m_Receiver
protected RatInput m_Receiver
the receiver to use.
-
m_Actors
protected adams.flow.control.LocalScopeSubProcess m_Actors
the actors for transforming the data.
-
m_Transmitter
protected RatOutput m_Transmitter
the transmitter to use.
-
m_Log
protected adams.flow.core.CallableActorReference m_Log
the callable name.
-
m_LogActor
protected adams.flow.core.Actor m_LogActor
the callable log actor.
-
m_LogGenerator
protected AbstractLogObjectGenerator m_LogGenerator
the generator for the log objects.
-
m_Helper
protected adams.flow.core.CallableActorHelper m_Helper
the helper class.
-
m_Runnable
protected RatRunnable m_Runnable
the runnable doing the work.
-
m_FlowErrorQueue
protected adams.flow.control.StorageName m_FlowErrorQueue
the name of the (optional) queue in internal storage for sending flow error to.
-
m_SendErrorQueue
protected adams.flow.control.StorageName m_SendErrorQueue
the name of the (optional) queue in internal storage for sending send error to.
-
m_ShowInControl
protected boolean m_ShowInControl
whether to show inRatControl.
-
m_Stopping
protected boolean m_Stopping
whether the rat is currently being stopped.
-
m_SuppressErrors
protected boolean m_SuppressErrors
whether errors a suppressed (only forwarded to log actor).
-
m_InitialState
protected RatState m_InitialState
the initial state.
-
m_Mode
protected RatMode m_Mode
the mode.
-
m_WrapUpAfterExecution
protected boolean m_WrapUpAfterExecution
whether to wrap up after executing the actors.
-
m_StateListeners
protected Set<RatStateListener> m_StateListeners
the state listeners.
-
m_LazySetupPeformed
protected boolean m_LazySetupPeformed
whether lazy initialization has been performed.
-
m_BreakpointPresent
protected boolean m_BreakpointPresent
whether a Breakpoint actor is part of the sub-flow.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.flow.core.AbstractActor
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classadams.flow.core.AbstractActor
-
setLoggingLevel
public void setLoggingLevel(adams.core.logging.LoggingLevel value)
Sets the logging level.- Specified by:
setLoggingLevelin interfaceadams.core.logging.LoggingLevelHandler- Overrides:
setLoggingLevelin classadams.core.option.AbstractOptionHandler- Parameters:
value- the level
-
setReceiver
public void setReceiver(RatInput value)
Sets the receiver to use.- Parameters:
value- the receiver
-
getReceiver
public RatInput getReceiver()
Returns the receiver to use.- Returns:
- the receiver
-
receiverTipText
public String receiverTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPerformLazySetup
public void setPerformLazySetup(boolean value)
Sets whether to perform a lazy setup, ie when first executed.- Specified by:
setPerformLazySetupin interfaceadams.flow.core.LazySetupSupporter- Parameters:
value- true if to perform lazy setup
-
getPerformLazySetup
public boolean getPerformLazySetup()
Returns whether to perform a lazy setup, ie when first executed.- Specified by:
getPerformLazySetupin interfaceadams.flow.core.LazySetupSupporter- Returns:
- true if to perform lazy setup
-
performLazySetupTipText
public String performLazySetupTipText()
Returns the tip text for this property.- Specified by:
performLazySetupTipTextin interfaceadams.flow.core.LazySetupSupporter- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getActorHandler
public adams.flow.control.LocalScopeSubProcess getActorHandler()
Returns the handler of the actors.- Returns:
- the handler
-
setActors
public void setActors(adams.flow.core.Actor[] value)
Sets the flow items for this sequence.- Parameters:
value- the sequence items
-
getActors
public adams.flow.core.Actor[] getActors()
Returns the flow items of this sequence.- Returns:
- the sequence items
-
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.
-
setTransmitter
public void setTransmitter(RatOutput value)
Sets the transmitter to use.- Parameters:
value- the transmitter
-
getTransmitter
public RatOutput getTransmitter()
Returns the transmitter to use.- Returns:
- the transmitter
-
transmitterTipText
public String transmitterTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLog
public void setLog(adams.flow.core.CallableActorReference value)
Sets the name of the callable log actor to use.- Parameters:
value- the callable name
-
getLog
public adams.flow.core.CallableActorReference getLog()
Returns the name of the callable log actor in use.- Returns:
- the callable name
-
logTipText
public String logTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLogGenerator
public void setLogGenerator(AbstractLogObjectGenerator value)
Sets the generator for turning error messages into log objects.- Parameters:
value- the generator
-
getLogGenerator
public AbstractLogObjectGenerator getLogGenerator()
Returns the generator for turning error messages into log objects.- Returns:
- the generator
-
logGeneratorTipText
public String logGeneratorTipText()
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(adams.flow.control.ScopeHandler.ScopeHandling value)
Sets how to handle variables into the local scope.- Parameters:
value- the scope handling
-
getScopeHandlingVariables
public adams.flow.control.ScopeHandler.ScopeHandling getScopeHandlingVariables()
Returns how variables are handled in the local scope.- Returns:
- the scope handling
-
scopeHandlingVariablesTipText
public String scopeHandlingVariablesTipText()
Returns the tip text for this property.- 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.- Parameters:
value- if true then variables get propagated
-
getPropagateVariables
public boolean getPropagateVariables()
Returns whether to propagate variables from the local to the outer scope.- Returns:
- true if variables get propagated
-
propagateVariablesTipText
public String propagateVariablesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setVariablesRegExp
public void setVariablesRegExp(adams.core.base.BaseRegExp value)
Sets the regular expression that variable names must match to get propagated.- Parameters:
value- the expression
-
getVariablesRegExp
public adams.core.base.BaseRegExp getVariablesRegExp()
Returns the regular expression that variable names must match to get propagated.- Returns:
- the expression
-
variablesRegExpTipText
public String variablesRegExpTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setScopeHandlingStorage
public void setScopeHandlingStorage(adams.flow.control.ScopeHandler.ScopeHandling value)
Sets how to handle storage in the local scope.- Parameters:
value- the scope handling
-
getScopeHandlingStorage
public adams.flow.control.ScopeHandler.ScopeHandling getScopeHandlingStorage()
Returns how storage is handled in the local scope.- Returns:
- the scope handling
-
scopeHandlingStorageTipText
public String scopeHandlingStorageTipText()
Returns the tip text for this property.- 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.- 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.- Returns:
- true if storage items get propagated
-
propagateStorageTipText
public String propagateStorageTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStorageRegExp
public void setStorageRegExp(adams.core.base.BaseRegExp value)
Sets the regular expression that storage item names must match to get propagated.- Parameters:
value- the expression
-
getStorageRegExp
public adams.core.base.BaseRegExp getStorageRegExp()
Returns the regular expression that storage item names must match to get propagated.- Returns:
- the expression
-
storageRegExpTipText
public String storageRegExpTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setFlowErrorQueue
public void setFlowErrorQueue(adams.flow.control.StorageName value)
Sets the name for the queue in internal storage to feed with flow errors.- Parameters:
value- the name- See Also:
queueFlowError(Object, String),ErrorContainer
-
getFlowErrorQueue
public adams.flow.control.StorageName getFlowErrorQueue()
Returns the name for the queue in internal storage to feed with flow errors.- Returns:
- the name
- See Also:
queueFlowError(Object, String),ErrorContainer
-
flowErrorQueueTipText
public String flowErrorQueueTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSendErrorQueue
public void setSendErrorQueue(adams.flow.control.StorageName value)
Sets the name for the queue in internal storage to feed with send errors.- Parameters:
value- the name- See Also:
queueSendError(Object, String),ErrorContainer
-
getSendErrorQueue
public adams.flow.control.StorageName getSendErrorQueue()
Returns the name for the queue in internal storage to feed with send errors.- Returns:
- the name
- See Also:
queueSendError(Object, String),ErrorContainer
-
sendErrorQueueTipText
public String sendErrorQueueTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setSuppressErrors
public void setSuppressErrors(boolean value)
Sets whether to suppress errors and only forward them to the log actor.- Parameters:
value- true if to suppress errors- See Also:
setLog(CallableActorReference)
-
getSuppressErrors
public boolean getSuppressErrors()
Returns whether suppress errors and only forward them to the log actor.- Returns:
- true if to suppress errors
- See Also:
setLog(CallableActorReference)
-
suppressErrorsTipText
public String suppressErrorsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setShowInControl
public void setShowInControl(boolean value)
Sets whether to show in RatControl.- Parameters:
value- true if to show in RatControl
-
getShowInControl
public boolean getShowInControl()
Returns whether to show in RatControl.- Returns:
- true if to show in RatControl
-
showInControlTipText
public String showInControlTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setInitialState
public void setInitialState(RatState value)
Sets the initial state of the Rat actor.- Parameters:
value- the state
-
getInitialState
public RatState getInitialState()
Returns the initial state of the Rat actor.- Returns:
- the state
-
initialStateTipText
public String initialStateTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setMode
public void setMode(RatMode value)
Sets the mode the Rat is run in.- Parameters:
value- the mode
-
getMode
public RatMode getMode()
Returns the mode the Rat is run in.- Returns:
- the mode
-
modeTipText
public String modeTipText()
Returns the tip text for this property.- 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 interfaceadams.flow.control.AtomicExecution- Parameters:
value- if true then actor finishes processing first
-
getFinishBeforeStopping
public boolean getFinishBeforeStopping()
Returns whether to finish processing before stopping execution.- Specified by:
getFinishBeforeStoppingin interfaceadams.flow.control.AtomicExecution- Returns:
- true if actor finishes processing first
-
finishBeforeStoppingTipText
public String finishBeforeStoppingTipText()
Returns the tip text for this property.- Specified by:
finishBeforeStoppingTipTextin interfaceadams.flow.control.AtomicExecution- 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 interfaceadams.flow.control.AtomicExecution- 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 interfaceadams.flow.control.AtomicExecution- Returns:
- timeout in milliseconds (<= 0 for infinity)
-
stoppingTimeoutTipText
public String stoppingTimeoutTipText()
Returns the tip text for this property.- Specified by:
stoppingTimeoutTipTextin interfaceadams.flow.control.AtomicExecution- 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.
-
setWrapUpAfterExecution
public void setWrapUpAfterExecution(boolean value)
Sets whether to wrap up the actors after execution. Only available in conjunction withm_PerformLazySetup.- Parameters:
value- if true then actors get wrapped up after execution
-
getWrapUpAfterExecution
public boolean getWrapUpAfterExecution()
Returns whether to wrap up the actors after execution. Only available in conjunction withm_PerformLazySetup.- Returns:
- true if actors get wrapped up after execution
-
wrapUpAfterExecutionTipText
public String wrapUpAfterExecutionTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getAdditionalInformation
public String getAdditionalInformation()
Returns the additional information.- Specified by:
getAdditionalInformationin interfaceadams.core.AdditionalInformationHandler- Overrides:
getAdditionalInformationin classadams.flow.core.AbstractActor- Returns:
- the additional information
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceadams.flow.core.Actor- Specified by:
getQuickInfoin interfaceadams.core.QuickInfoSupporter- Overrides:
getQuickInfoin classadams.flow.core.AbstractActor- Returns:
- null if no info available, otherwise short string
-
setParent
public void setParent(adams.flow.core.Actor value)
Sets the parent of this actor, e.g., the group it belongs to.- Specified by:
setParentin interfaceadams.flow.core.Actor- Overrides:
setParentin classadams.flow.core.AbstractActor- Parameters:
value- the new parent
-
getActorHandlerInfo
public adams.flow.core.ActorHandlerInfo getActorHandlerInfo()
Returns some information about the actor handler, e.g., whether it can contain standalones and the actor execution.- Specified by:
getActorHandlerInfoin interfaceadams.flow.core.ActorHandler- Returns:
- the info
-
setErrorHandler
public void setErrorHandler(adams.flow.core.ErrorHandler value)
Sets the error handler to use for handling errors in the flow.- Specified by:
setErrorHandlerin interfaceadams.flow.core.Actor- Overrides:
setErrorHandlerin classadams.flow.core.AbstractActor- Parameters:
value- the error handler
-
handleError
public String handleError(adams.flow.core.Actor source, String type, String msg)
Handles the given error message with the flow that this actor belongs to, if the flow has error logging turned on. Might stop the flow as well.- Specified by:
handleErrorin interfaceadams.flow.core.Actor- Specified by:
handleErrorin interfaceadams.flow.core.ErrorHandler- Overrides:
handleErrorin classadams.flow.core.AbstractActor- Parameters:
source- the source of the errortype- the type of errormsg- the error message to log- Returns:
- null if
m_SuppressErrors, otherwise the error message
-
check
public String check()
Performs checks on the "sub-actors".- Specified by:
checkin interfaceadams.flow.core.ActorHandler- Returns:
- null if everything is fine, otherwise the error
-
size
public int size()
Returns the size of the group.- Specified by:
sizein interfaceadams.flow.core.ActorHandler- Returns:
- the size
-
get
public adams.flow.core.Actor get(int index)
Returns the actor at the given position.- Specified by:
getin interfaceadams.flow.core.ActorHandler- Parameters:
index- the position- Returns:
- the actor
-
set
public String set(int index, adams.flow.core.Actor actor)
Sets the actor at the given position.- Specified by:
setin interfaceadams.flow.core.ActorHandler- 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 interfaceadams.flow.core.ActorHandler- Parameters:
actor- the name of the actor to look for- Returns:
- the index of -1 if not found
-
firstActive
public adams.flow.core.Actor firstActive()
Returns the first non-skipped actor.- Specified by:
firstActivein interfaceadams.flow.core.ActorHandler- Returns:
- the first 'active' actor, null if none available
-
lastActive
public adams.flow.core.Actor lastActive()
Returns the last non-skipped actor.- Specified by:
lastActivein interfaceadams.flow.core.ActorHandler- Returns:
- the last 'active' actor, null if none available
-
add
public String add(adams.flow.core.Actor actor)
Inserts the actor at the end.- Specified by:
addin interfaceadams.flow.core.MutableActorHandler- Parameters:
actor- the actor to insert- Returns:
- null if successful, otherwise error message
-
add
public String add(int index, adams.flow.core.Actor actor)
Inserts the actor at the given position.- Specified by:
addin interfaceadams.flow.core.MutableActorHandler- Parameters:
index- the positionactor- the actor to insert- Returns:
- null if successful, otherwise error message
-
remove
public adams.flow.core.Actor remove(int index)
Removes the actor at the given position and returns the removed object.- Specified by:
removein interfaceadams.flow.core.MutableActorHandler- Parameters:
index- the position- Returns:
- the removed actor
-
removeAll
public void removeAll()
Removes all actors.- Specified by:
removeAllin interfaceadams.flow.core.MutableActorHandler
-
getLocalScope
public adams.flow.control.LocalScopeSubProcess getLocalScope()
Returns the internal local scope transformer.- Returns:
- the actor, null if not available
-
forceVariables
protected void forceVariables(adams.core.Variables value)
Updates the Variables instance in use.
Use with caution!- Overrides:
forceVariablesin classadams.flow.core.AbstractActor- Parameters:
value- the instance to use
-
findCallableActor
protected adams.flow.core.Actor findCallableActor()
Tries to find the callable actor referenced by its callable name.- Returns:
- the callable actor or null if not found
-
hasCallableActor
public boolean hasCallableActor()
Checks whether a reference to the callable actor is currently available.- Returns:
- true if a reference is available
- See Also:
getCallableActor()
-
getCallableActor
public adams.flow.core.Actor getCallableActor()
Returns the currently set callable actor.- Specified by:
getCallableActorin interfaceadams.flow.core.CallableActorUser- Returns:
- the actor, can be null
-
isBreakpointPresent
public boolean isBreakpointPresent()
Returns whether a breakpoint is present.- Returns:
- true if present
-
log
public void log(String msg, String id)
Logs an error message if a valid callable log actor has been set up.- Parameters:
msg- the message to logid- an optional ID of the data token that failed in the web service
-
queueSendError
public boolean queueSendError(Object payload, String error)
Creates anErrorContainerwith the provided data and puts it in them_SendErrorQueue(if the queue is available).- Parameters:
payload- the payload to forwarderror- the associated error- Returns:
- true if successfully queued
- See Also:
ErrorContainer
-
queueFlowError
public boolean queueFlowError(Object payload, String error)
Creates anErrorContainerwith the provided data and puts it in them_FlowErrorQueue(if the queue is available).- Parameters:
payload- the payload to forwarderror- the associated error- Returns:
- true if successfully queued
- See Also:
ErrorContainer
-
setUp
public String setUp()
Initializes the item for flow execution.- Specified by:
setUpin interfaceadams.flow.core.Actor- Overrides:
setUpin classadams.flow.core.AbstractActor- Returns:
- null if everything is fine, otherwise error message
-
hasLazySetupPerformed
public boolean hasLazySetupPerformed()
Returns whether lazy setup has been performed.- Specified by:
hasLazySetupPerformedin interfaceadams.flow.core.LazySetupSupporter- Returns:
- true if performed or breakpoint present (which disables lazy setup)
- See Also:
isBreakpointPresent()
-
lazySetup
public String lazySetup()
Performs the lazy setup.- Specified by:
lazySetupin interfaceadams.flow.core.LazySetupSupporter- Returns:
- null if successful, otherwise error message
-
startRunnable
public String startRunnable()
Starts the runnable.- Returns:
- null if successful, otherwise error message
-
performVariableChecks
protected String performVariableChecks()
For performing variable checks.- Overrides:
performVariableChecksin classadams.flow.core.AbstractActor- Returns:
- always null
-
doExecute
protected String doExecute()
Executes the flow item.- Specified by:
doExecutein classadams.flow.core.AbstractActor- Returns:
- null if everything is fine, otherwise error message
-
pauseExecution
public void pauseExecution()
Pauses the execution.- Specified by:
pauseExecutionin interfaceadams.core.Pausable
-
isPaused
public boolean isPaused()
Returns whether the object is currently paused.- Specified by:
isPausedin interfaceadams.core.Pausable- Returns:
- true if object is paused
-
resumeExecution
public void resumeExecution()
Resumes the execution.- Specified by:
resumeExecutionin interfaceadams.core.Pausable
-
isRunnableActive
public boolean isRunnableActive()
Returns whwether the runnable is currently active.- Returns:
- true if active
-
stopRunnable
public void stopRunnable()
Stops the runnable.
-
wrapUpRunnable
public void wrapUpRunnable()
Nulls the runnable and notifies listeners.
-
stopIfNecessary
protected void stopIfNecessary()
Stops the execution if necessary.
-
flushExecution
public void flushExecution()
Stops the processing of tokens without stopping the flow.- Specified by:
flushExecutionin interfaceadams.flow.core.ActorHandler- Specified by:
flushExecutionin interfaceadams.flow.core.Flushable
-
stopExecution
public void stopExecution()
Stops the execution. No message set.- Specified by:
stopExecutionin interfaceadams.flow.core.Actor- Specified by:
stopExecutionin interfaceadams.core.Stoppable- Overrides:
stopExecutionin classadams.flow.core.AbstractActor
-
wrapUp
public void wrapUp()
Cleans up after the execution has finished. Graphical output is left untouched.- Specified by:
wrapUpin interfaceadams.flow.core.Actor- Overrides:
wrapUpin classadams.flow.core.AbstractActor
-
flowPauseStateChanged
public void flowPauseStateChanged(adams.event.FlowPauseStateEvent e)
Gets called when the pause state of the flow changes.- Specified by:
flowPauseStateChangedin interfaceadams.event.FlowPauseStateListener- Parameters:
e- the event
-
addRatStateListener
public void addRatStateListener(RatStateListener l)
Adds the state listener.- Parameters:
l- the listener
-
removeRatStateListener
public void removeRatStateListener(RatStateListener l)
Removes the state listener.- Parameters:
l- the listener
-
notifyRatStateListeners
public void notifyRatStateListeners()
Notifies all the listeners.
-
getDebugScopeRestriction
public adams.flow.execution.debug.AbstractScopeRestriction getDebugScopeRestriction()
Returns the scope restriction in place.- Specified by:
getDebugScopeRestrictionin interfaceadams.flow.execution.debug.DebugScopeRestrictionHandler- Returns:
- the scope restriction
-
getDebugScopeRestriction
public adams.flow.execution.debug.AbstractScopeRestriction getDebugScopeRestriction(adams.gui.flow.tree.Node context)
Returns the scope restriction in place.- Specified by:
getDebugScopeRestrictionin interfaceadams.flow.execution.debug.DebugScopeRestrictionHandler- Parameters:
context- the actor's node- Returns:
- the scope restriction
-
cleanUp
public void cleanUp()
Cleans up after the execution has finished. Also removes graphical components.- Specified by:
cleanUpin interfaceadams.flow.core.Actor- Specified by:
cleanUpin interfaceadams.core.CleanUpHandler- Overrides:
cleanUpin classadams.flow.core.AbstractActor
-
-