Class AbstractSubProcessEventTrigger<I,O>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.standalone.subprocessevent.AbstractSubProcessEventTrigger<I,O>
-
- Type Parameters:
I
- the data to receiveO
- the data to send
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,SubProcessEventTrigger<I,O>
,Serializable
public abstract class AbstractSubProcessEventTrigger<I,O> extends AbstractOptionHandler implements SubProcessEventTrigger<I,O>, QuickInfoSupporter
Ancestor for triggers.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_BusyTimeout
the timeout in msec to wait for the actors to become available for processing.protected SubProcessEvent
m_Owner
the owner.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractSubProcessEventTrigger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
busyTimeoutTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.int
getBusyTimeout()
Returns the timeout for waiting for the sub-flow to stop.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.protected Object
process(Object data, MessageCollection errors)
Processes the data with the sub-flow.void
setBusyTimeout(int value)
Sets the timeout for waiting for the sub-flow to stop.String
setUp(SubProcessEvent owner)
Configures the trigger.void
wrapUp()
Wraps up the trigger.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Owner
protected SubProcessEvent m_Owner
the owner.
-
m_BusyTimeout
protected int m_BusyTimeout
the timeout in msec to wait for the actors to become available for processing.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setBusyTimeout
public void setBusyTimeout(int value)
Sets the timeout for waiting for the sub-flow to stop.- Parameters:
value
- timeout in milliseconds (<= 0 for infinity)
-
getBusyTimeout
public int getBusyTimeout()
Returns the timeout for waiting for the sub-flow to stop.- Returns:
- timeout in milliseconds (<= 0 for infinity)
-
busyTimeoutTipText
public String busyTimeoutTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
setUp
public String setUp(SubProcessEvent owner)
Configures the trigger.- Specified by:
setUp
in interfaceSubProcessEventTrigger<I,O>
- Parameters:
owner
- the owning event- Returns:
- null if successfully configured, otherwise error message
-
process
protected Object process(Object data, MessageCollection errors)
Processes the data with the sub-flow. Waits for the actors to become available.- Parameters:
data
- the data to processerrors
- for collecting errors- Returns:
- the processed data, null if not data generated or failed to process data
-
wrapUp
public void wrapUp()
Wraps up the trigger.- Specified by:
wrapUp
in interfaceSubProcessEventTrigger<I,O>
-
-