Class FileEventActivitySource
java.lang.Object
de.aristaflow.adept2.core.eventmanager.common.AbstractEventSource<FileEvent>
de.aristaflow.adept2.core.eventmanager.fileevents.FileEventSource
de.aristaflow.adept2.core.eventmanager.fileevents.FileEventActivitySource
- All Implemented Interfaces:
ActivityEventSource<FileEvent>,EventSource<FileEvent>,PollingFileSource,PollingSource<FileEvent>,Runnable
public class FileEventActivitySource
extends FileEventSource
implements ActivityEventSource<FileEvent>
A file 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.aristaflow.adept2.core.eventmanager.fileevents.FileEventSource
FileEventSource.FileEventFilter -
Field Summary
Fields inherited from class de.aristaflow.adept2.core.eventmanager.fileevents.FileEventSource
eventManagerURIs, filterName, filterOptions, isLockFile, lockFileEvent, lockSuffix, namePattern, pollTime, searchPath, skipDirectories, skipFiles, skipLocked, startPointFields 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.PollingFileSource
CONF_FILENAME_FILTER, CONF_IS_LOCK_FILE, CONF_LOCK_FILE_EVENT, CONF_LOCK_SUFFIX, CONF_SEARCH_DIRECTORY, CONF_SKIP_DIRECTORIES, CONF_SKIP_FILES, CONF_SKIP_LOCKEDFields inherited from interface de.aristaflow.adept2.model.events.sources.PollingSource
CONF_POLL_TIME, CONF_START_TIME -
Constructor Summary
ConstructorsConstructorDescriptionFileEventActivitySource(Configuration conf, AbstractEventManager eventManager, Registry registry) Default constructor for a plugin of anEventManagercalled by a service registry.FileEventActivitySource(Configuration conf, EventManager eventManager, Registry registry) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetConfiguration(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.fileevents.FileEventSource
checkForAndHandleEvent, createFileEvent, createLockFileEvent, getPollTime, getStartTime, nextHandler, setConfiguration, terminate, 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
-
Constructor Details
-
FileEventActivitySource
@Deprecated(since="16.2.0", forRemoval=true) public FileEventActivitySource(Configuration conf, EventManager eventManager, Registry registry) throws ConfigurationException Deprecated, for removal: This API element is subject to removal in a future version.Default constructor for a plugin of anEventManagercalled by a service registry.- Parameters:
conf- The configuration as provided from the registry.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 aPollingFileSource, aConfigurationExceptionwill be thrown.
-
FileEventActivitySource
public FileEventActivitySource(Configuration conf, AbstractEventManager eventManager, Registry registry) throws ConfigurationException Default constructor for a plugin of anEventManagercalled by a service registry.- Parameters:
conf- The configuration as provided from the registry.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 aPollingFileSource, aConfigurationExceptionwill be thrown.
-
-
Method Details
-
setConfiguration
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.
Afterwards parameter references in the attribute values will be replaced with the data context.- Overrides:
setConfigurationin classFileEventSource- 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.
-
FileEventActivitySource(Configuration, AbstractEventManager, Registry)instead.