Class DBActivityEventSource
java.lang.Object
de.aristaflow.adept2.core.eventmanager.common.AbstractEventSource<ResultSetEvent>
de.aristaflow.adept2.core.eventmanager.dbevents.DBEventSource
de.aristaflow.adept2.core.eventmanager.dbevents.DBActivityEventSource
- All Implemented Interfaces:
ActivityEventSource<ResultSetEvent>,EventSource<ResultSetEvent>,PollingSource<ResultSetEvent>,ResultSetSource,Runnable
public class DBActivityEventSource
extends DBEventSource
implements ActivityEventSource<ResultSetEvent>
A DB event source that takes its configuration from an activity configuration
provided from a process step. This allows to have activities that wait for an
event to occur.
-
Field Summary
Fields inherited from class de.aristaflow.adept2.core.eventmanager.dbevents.DBEventSource
dataSource, eventManager, jdbcConnectionURL, jdbcDriver, jdbcPassword, jdbcUserName, notifyEmptyOnly, pollTime, selectStatement, startTimeFields inherited from class de.aristaflow.adept2.core.eventmanager.common.AbstractEventSource
eventType, handlerList, id, lock, logger, sourceType, thread, threadLockFields inherited from interface de.aristaflow.adept2.model.events.sources.ActivityEventSource
CONF_SIMPLE_SESSION_CONTEXTFields inherited from interface de.aristaflow.adept2.model.events.sources.PollingSource
CONF_POLL_TIME, CONF_START_TIMEFields inherited from interface de.aristaflow.adept2.model.events.sources.ResultSetSource
CONF_DATA_SOURCE_NAME, CONF_JDBC_CONNECTION_URL, CONF_JDBC_DRIVER, CONF_JDBC_PASSWORD, CONF_JDBC_USER_NAME, CONF_NOTIFY_EMPTY_ONLY, CONF_SELECT_STATEMENT -
Constructor Summary
ConstructorsConstructorDescriptionDBActivityEventSource(Configuration conf, DefaultEventManager eventManager, Registry registry) Default constructor for a plugin of theDefaultEventManagercalled by a service registry. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsetConfiguration(Configuration conf, boolean completed) Sets the internal fields according to the values of the designated configuration.Methods inherited from class de.aristaflow.adept2.core.eventmanager.dbevents.DBEventSource
checkForAndHandleEvent, createResultSetEvent, getPollTime, getStartTime, nextHandler, setConfiguration, verifyConfigurationValuesMethods inherited from class de.aristaflow.adept2.core.eventmanager.common.AbstractEventSource
addAll, addedHandlerLocked, addedHandlerLocked, addHandler, createPattern, forwardEvent, getEventHandler, getHierarchicalSourceName, getID, getType, maskedInterrupt, maskInterrupt, removeHandler, removingHandlerLocked, replaceValueParams, run, unmaskInterruptMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.aristaflow.adept2.model.events.sources.EventSource
addAll, addHandler, getEventHandler, getHierarchicalSourceName, getID, getType, removeHandler, setConfigurationMethods inherited from interface de.aristaflow.adept2.model.events.sources.PollingSource
init, terminate
-
Constructor Details
-
DBActivityEventSource
public DBActivityEventSource(Configuration conf, DefaultEventManager eventManager, Registry registry) throws ConfigurationException Default constructor for a plugin of theDefaultEventManagercalled by a service registry.- Parameters:
conf- The configuration as provided from the registry. This is not expected to contain the simple session context of the activity of this event source.eventManager- The event manager this event source is a plugin of.registry- The registry of this plugin.- Throws:
ConfigurationException- If the configuration is not valid for aResultSetEvent, aConfigurationExceptionwill be thrown.
-
-
Method Details
-
setConfiguration
protected void setConfiguration(Configuration conf, boolean completed) throws ConfigurationException Sets the internal fields according to the values of the designated configuration. Note that this method is called from the constructor and therefore this object may not be fully initialised! Sets the configuration by retrieving the session context from it and setting the fields according to the session context. This incorporates overwriting the existing configuration with the values from the activity configuration.- Overrides:
setConfigurationin classDBEventSource- Parameters:
conf- The configuration from which to get the configuration values.completed- Whether the configuration is complete after this setting and therefore the values should be verified.- Throws:
ConfigurationException- If there are problems with the configuration, for instance the configuration does not provide required values, aConfigurationExceptionmay be thrown.
-