Class AbstractIMAPFolderWorkflowEventSource
- java.lang.Object
-
- de.uplanet.lucy.server.workflow.eventsource.AbstractWorkflowEventSource
-
- de.uplanet.lucy.server.workflow.eventsource.AbstractSingleThreadedWorkflowEventSource
-
- de.uplanet.lucy.server.mailservice.workflow.eventsource.AbstractIMAPFolderWorkflowEventSource
-
- All Implemented Interfaces:
IActivatableWorkflowObject
,de.uplanet.lucy.server.workflow.IImpersonateUser
,ILogLevelAware
,INamedWorkflowObject
,de.uplanet.lucy.server.workflow.INeedClusterInfo
,INeedWorkflow
,IRunnableWorkflowObject
,IStartableWorkflowObject
,ISupportAfterStopEvent
,ISupportBeforeStartEvent
,ISupportGlobalSharedState
,IWorkflowEventSource
,IWorkflowObject
,Serializable
- Direct Known Subclasses:
IMAPFolderPollingWorkflowEventSource
public abstract class AbstractIMAPFolderWorkflowEventSource extends AbstractSingleThreadedWorkflowEventSource implements de.uplanet.lucy.server.workflow.INeedClusterInfo, ISupportGlobalSharedState, ISupportBeforeStartEvent, ISupportAfterStopEvent
- Since:
- Intrexx 7.0.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject
GUID_COMPARATOR
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.uplanet.lucy.server.workflow.IClusterInfo
getClusterInfo()
long
getDispatchDelay()
Get the dispatch delay, i.e.IMAPFinishActionCfg
getFinishAction()
Get the action to be performed after an IMAP message has been processed.String
getFolder()
String
getHost()
Get the IMAP server to connect to.Map<String,String>
getJavaMailProperties()
MessageSelectFilterCfg
getMessageSelectFilter()
Get the filter for selecting messages that are to be processed.long
getOnErrorRestartWaitTimeout()
Get the time in milliseconds the event source will wait before it tries to restart after an error occurred that prevented it to running the source loop.String
getPassword()
Get the password of the IMAP user.int
getPort()
Get the port the IMAP server listens to.String
getProtocol()
Get the protocol.String
getUser()
Get the name of the IMAP user.boolean
isGlobalSharedState()
This property determines if a global shared state should be used for all events created by this event source.boolean
isLoadIncomingMessagesImmediately()
This property determines if incoming messages should be loaded immediately and be included in the generated events.boolean
isSendAfterStopEvent()
This property determines if anIAfterStopWatchIMAPFolderWorkflowEvent
should be sent.boolean
isSendBeforeStartEvent()
This property determines if anIBeforeStartWatchIMAPFolderWorkflowEvent
should be sent.void
setClusterInfo(de.uplanet.lucy.server.workflow.IClusterInfo p_clusterInfo)
void
setDispatchDelay(long p_lDispatchDelay)
Set the dispatch delay, i.e.void
setFinishAction(IMAPFinishActionCfg p_finishAction)
Set the action to be performed after an IMAP message has been processed.void
setFolder(String p_strFolder)
void
setGlobalSharedState(boolean p_bGlobalSharedState)
This property determines if a global shared state should be used for all events created by this event source.void
setHost(String p_strHost)
Set the IMAP server to connect to.void
setJavaMailProperties(Map<String,String> p_javaMailProperties)
void
setLoadIncomingMessagesImmediately(boolean p_bLoadIncomingMessagesImmediately)
This property determines if incoming messages should be loaded immediately and be included in the generated events.void
setMessageSelectFilter(MessageSelectFilterCfg p_selectFilter)
Set the filter for selecting messages that are to be processed.void
setOnErrorRestartWaitTimeout(long p_lOnErrorRestartWaitTimeout)
Set the time in milliseconds the event source will wait before it tries to restart after an error occurred that prevented it to running the source loop.void
setPassword(String p_strPassword)
Set the password of the IMAP user.void
setPort(int p_iPort)
Set the port the IMAP server listens to.void
setProtocol(String p_strProtocol)
Set the protocol.void
setSendAfterStopEvent(boolean p_bSendAfterStopEvent)
This property determines if anIAfterStopWatchIMAPFolderWorkflowEvent
should be sent.void
setSendBeforeStartEvent(boolean p_bSendBeforeStartEvent)
This property determines if anIBeforeStartWatchIMAPFolderWorkflowEvent
should be sent.void
setUser(String p_strUser)
Set the name of the IMAP user.-
Methods inherited from class de.uplanet.lucy.server.workflow.eventsource.AbstractSingleThreadedWorkflowEventSource
getDatabaseConnectionFactory, getStartDelay, getStopWaitTimeout, isLogVerbose, isRunning, setDatabaseConnectionFactory, setLogVerbose, setStartDelay, setStopWaitTimeout, shouldRun, start, stop
-
Methods inherited from class de.uplanet.lucy.server.workflow.eventsource.AbstractWorkflowEventSource
getGuid, getImpersonateUserGuid, getName, getWorkflow, hasImpersonateUserGuid, isActive, isRunWithLocalSystemPrivileges, setActive, setImpersonateUserGuid, setName, setRunWithLocalSystemPrivileges, setWorkflow, toString
-
-
-
-
Method Detail
-
getClusterInfo
public de.uplanet.lucy.server.workflow.IClusterInfo getClusterInfo()
- Specified by:
getClusterInfo
in interfacede.uplanet.lucy.server.workflow.INeedClusterInfo
-
setClusterInfo
public void setClusterInfo(de.uplanet.lucy.server.workflow.IClusterInfo p_clusterInfo)
- Specified by:
setClusterInfo
in interfacede.uplanet.lucy.server.workflow.INeedClusterInfo
-
isSendBeforeStartEvent
public boolean isSendBeforeStartEvent()
This property determines if anIBeforeStartWatchIMAPFolderWorkflowEvent
should be sent.- Specified by:
isSendBeforeStartEvent
in interfaceISupportBeforeStartEvent
- Returns:
true
if the event should be sent before the workflow object's activity is about to being started, orfalse
otherwise.
-
setSendBeforeStartEvent
public void setSendBeforeStartEvent(boolean p_bSendBeforeStartEvent)
This property determines if anIBeforeStartWatchIMAPFolderWorkflowEvent
should be sent.- Specified by:
setSendBeforeStartEvent
in interfaceISupportBeforeStartEvent
- Parameters:
p_bSendBeforeStartEvent
-true
if the event should be sent before the workflow object's activity is about to being started, orfalse
otherwise.
-
isSendAfterStopEvent
public boolean isSendAfterStopEvent()
This property determines if anIAfterStopWatchIMAPFolderWorkflowEvent
should be sent.- Specified by:
isSendAfterStopEvent
in interfaceISupportAfterStopEvent
- Returns:
true
if the event should be sent after the workflow object's activity has been stopped, orfalse
otherwise.
-
setSendAfterStopEvent
public void setSendAfterStopEvent(boolean p_bSendAfterStopEvent)
This property determines if anIAfterStopWatchIMAPFolderWorkflowEvent
should be sent.- Specified by:
setSendAfterStopEvent
in interfaceISupportAfterStopEvent
- Parameters:
p_bSendAfterStopEvent
-true
if the event should be sent after the workflow object's activity has been stopped, orfalse
otherwise.
-
getDispatchDelay
public long getDispatchDelay()
Get the dispatch delay, i.e. the delay before an IMAP message event is dispatched to the workflows.- Returns:
- The dispatch delay in milliseconds.
-
setDispatchDelay
public void setDispatchDelay(long p_lDispatchDelay)
Set the dispatch delay, i.e. the delay before an IMAP message event is dispatched to the workflows.- Parameters:
p_lDispatchDelay
- The dispatch delay in milliseconds.
-
isLoadIncomingMessagesImmediately
public boolean isLoadIncomingMessagesImmediately()
This property determines if incoming messages should be loaded immediately and be included in the generated events.If set to
false
loading of the message will be delayed until it is accessed through the event's message property.The default value is
false
.- Returns:
true
if incoming messages should be loaded immediately, orfalse
otherwise.
-
setLoadIncomingMessagesImmediately
public void setLoadIncomingMessagesImmediately(boolean p_bLoadIncomingMessagesImmediately)
This property determines if incoming messages should be loaded immediately and be included in the generated events.If set to
false
loading of the message will be delayed until it is accessed through the event's message property.The default value is
false
.- Parameters:
p_bLoadIncomingMessagesImmediately
-true
if incoming messages should be loaded immediately, orfalse
otherwise.
-
isGlobalSharedState
public boolean isGlobalSharedState()
This property determines if a global shared state should be used for all events created by this event source.- Specified by:
isGlobalSharedState
in interfaceISupportGlobalSharedState
- Returns:
true
if a global shared state should be used, orfalse
otherwise.
-
setGlobalSharedState
public void setGlobalSharedState(boolean p_bGlobalSharedState)
This property determines if a global shared state should be used for all events created by this event source.- Specified by:
setGlobalSharedState
in interfaceISupportGlobalSharedState
- Parameters:
p_bGlobalSharedState
-true
if a global shared state should be used, orfalse
otherwise.
-
getOnErrorRestartWaitTimeout
public long getOnErrorRestartWaitTimeout()
Get the time in milliseconds the event source will wait before it tries to restart after an error occurred that prevented it to running the source loop.The default value is 60000 milliseconds (one minute).
- Returns:
- The timeout in milliseconds.
-
setOnErrorRestartWaitTimeout
public void setOnErrorRestartWaitTimeout(long p_lOnErrorRestartWaitTimeout)
Set the time in milliseconds the event source will wait before it tries to restart after an error occurred that prevented it to running the source loop.- Parameters:
p_lOnErrorRestartWaitTimeout
- The timeout in milliseconds.
-
getProtocol
public String getProtocol()
Get the protocol.- Returns:
- Either
IMAP
, orIMAPS
, orIMAP_STARTTLS
.
-
setProtocol
public void setProtocol(String p_strProtocol)
Set the protocol.- Parameters:
p_strProtocol
- The protocol, i.e. eitherIMAP
, orIMAPS
, orIMAP_STARTTLS
.
-
getHost
public String getHost()
Get the IMAP server to connect to.- Returns:
- The IMAP server.
-
setHost
public void setHost(String p_strHost)
Set the IMAP server to connect to.- Parameters:
p_strHost
- The IMAP server.
-
getPort
public int getPort()
Get the port the IMAP server listens to.- Returns:
- The port.
-
setPort
public void setPort(int p_iPort)
Set the port the IMAP server listens to.- Parameters:
p_iPort
- The port.
-
getUser
public String getUser()
Get the name of the IMAP user.- Returns:
- The name of the IMAP user.
-
setUser
public void setUser(String p_strUser)
Set the name of the IMAP user.- Parameters:
p_strUser
- The name of the IMAP user.
-
getPassword
public String getPassword()
Get the password of the IMAP user.- Returns:
- The password of the IMAP user.
-
setPassword
public void setPassword(String p_strPassword)
Set the password of the IMAP user.- Parameters:
p_strPassword
- The password of the IMAP user.
-
getFolder
public String getFolder()
-
setFolder
public void setFolder(String p_strFolder)
-
getMessageSelectFilter
public MessageSelectFilterCfg getMessageSelectFilter()
Get the filter for selecting messages that are to be processed.- Returns:
- The message filter.
-
setMessageSelectFilter
public void setMessageSelectFilter(MessageSelectFilterCfg p_selectFilter)
Set the filter for selecting messages that are to be processed.- Parameters:
p_selectFilter
- The message filter.
-
getFinishAction
public IMAPFinishActionCfg getFinishAction()
Get the action to be performed after an IMAP message has been processed.- Returns:
- The finish action.
-
setFinishAction
public void setFinishAction(IMAPFinishActionCfg p_finishAction)
Set the action to be performed after an IMAP message has been processed.- Parameters:
p_finishAction
- The finish action.
-
-