Class MailEventActivitySource
- java.lang.Object
-
- de.aristaflow.adept2.core.eventmanager.common.AbstractEventSource<MailEvent>
-
- de.aristaflow.adept2.core.eventmanager.mailevents.MailEventSource
-
- de.aristaflow.adept2.core.eventmanager.mailevents.MailEventActivitySource
-
- All Implemented Interfaces:
ActivityEventSource<MailEvent>
,EventSource<MailEvent>
,MailSource
,PollingMailSource
,PollingSource<MailEvent>
,Runnable
public class MailEventActivitySource extends MailEventSource implements ActivityEventSource<MailEvent>
A mail 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.mailevents.MailEventSource
AUTHMECH_XOAUTH2, authMechanism, CONF_AUTH_MECHANISM, CONF_OAUTH2_ACCESS_TOKEN_PROVIDER_ID, eventManager, eventManagerURIs, folderName, host, keepConnection, oauth2AccessTokenProvider, oauth2AccessTokenProviderId, password, PLUGIN_TYPE_OAUTH2_ACCESS_TOKEN_PROVIDER, pollTime, port, protocol, sslProtocols, startPoint, store, timeout, userName
-
Fields inherited from class de.aristaflow.adept2.core.eventmanager.common.AbstractEventSource
eventType, handlerList, id, lock, logger, sourceType, thread, threadLock
-
Fields inherited from interface de.aristaflow.adept2.model.events.sources.ActivityEventSource
CONF_SIMPLE_SESSION_CONTEXT
-
Fields inherited from interface de.aristaflow.adept2.model.events.sources.MailSource
CONF_FOLDER, CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_PROTOCOL, CONF_SSL_PROTOCOLS, CONF_TIMEOUT, CONF_USER_NAME
-
Fields inherited from interface de.aristaflow.adept2.model.events.sources.PollingMailSource
CONF_KEEP_CONNECTION
-
Fields inherited from interface de.aristaflow.adept2.model.events.sources.PollingSource
CONF_POLL_TIME, CONF_START_TIME
-
-
Constructor Summary
Constructors Constructor Description MailEventActivitySource(org.apache.commons.configuration2.Configuration conf, AbstractEventManager eventManager, Registry registry)
Default constructor for a plugin of anEventManager
called by a service registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setConfiguration(org.apache.commons.configuration2.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.mailevents.MailEventSource
checkForAndHandleEvent, close, closeStore, connectToStore, createMailEvent, getPollTime, getStartTime, init, nextHandler, openFolder, setConfiguration, terminate, timedOut, verifyConfigurationValues
-
Methods 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, unmaskInterrupt
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.aristaflow.adept2.model.events.sources.EventSource
addAll, addHandler, getEventHandler, getHierarchicalSourceName, getID, getType, removeHandler, setConfiguration
-
-
-
-
Constructor Detail
-
MailEventActivitySource
public MailEventActivitySource(org.apache.commons.configuration2.Configuration conf, AbstractEventManager eventManager, Registry registry) throws ConfigurationException
Default constructor for a plugin of anEventManager
called 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 aPollingMailSource
, aConfigurationException
will be thrown.
-
-
Method Detail
-
setConfiguration
public void setConfiguration(org.apache.commons.configuration2.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.
Afterwards parameter references in the attribute values will be replaced with the data context.- Overrides:
setConfiguration
in classMailEventSource
- 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, aConfigurationException
may be thrown.
-
-