Class AbstractSingleThreadedWorkflowEventSource
- java.lang.Object
-
- de.uplanet.lucy.server.workflow.eventsource.AbstractWorkflowEventSource
-
- de.uplanet.lucy.server.workflow.eventsource.AbstractSingleThreadedWorkflowEventSource
-
- All Implemented Interfaces:
IActivatableWorkflowObject
,de.uplanet.lucy.server.workflow.IImpersonateUser
,ILogLevelAware
,INamedWorkflowObject
,INeedWorkflow
,IRunnableWorkflowObject
,IStartableWorkflowObject
,IWorkflowEventSource
,IWorkflowObject
,Serializable
- Direct Known Subclasses:
AbstractIMAPFolderWorkflowEventSource
,AbstractJMSWorkflowEventSource
,FileSystemWorkflowEventSource
,MaildirWorkflowEventSource
,MQTTWorkflowEventSource
,UDPWorkflowEventSource
public abstract class AbstractSingleThreadedWorkflowEventSource extends AbstractWorkflowEventSource implements IStartableWorkflowObject, IRunnableWorkflowObject, ILogLevelAware
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface de.uplanet.lucy.server.workflow.IWorkflowObject
GUID_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description AbstractSingleThreadedWorkflowEventSource(String p_strGuid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.uplanet.jdbc.IDatabaseConnectionFactory
getDatabaseConnectionFactory()
Get the database connection factory used by this event source.long
getStartDelay()
Get the start delay for this event source, i.e.long
getStopWaitTimeout()
Get the stop wait timeout.boolean
isLogVerbose()
This flag determines if verbose logging is turned on or off.boolean
isRunning()
Check if the workflow object is running.void
setDatabaseConnectionFactory(de.uplanet.jdbc.IDatabaseConnectionFactory p_connFactory)
Set the database connection factory used by this event source.void
setLogVerbose(boolean p_bLogVerbose)
This flag determines if verbose logging is turned on or off.void
setStartDelay(long p_lStartDelay)
Set start delay for this event source, i.e.void
setStopWaitTimeout(long p_lStopWaitTimeout)
Set the stop wait timeout.boolean
shouldRun()
Indicates if the worker thread should run or not.void
start()
Start the workflow object.void
stop()
Stop the workflow object.-
Methods inherited from class de.uplanet.lucy.server.workflow.eventsource.AbstractWorkflowEventSource
getGuid, getImpersonateUserGuid, getName, getWorkflow, hasImpersonateUserGuid, isActive, isRunWithLocalSystemPrivileges, setActive, setImpersonateUserGuid, setName, setRunWithLocalSystemPrivileges, setWorkflow, toString
-
-
-
-
Constructor Detail
-
AbstractSingleThreadedWorkflowEventSource
public AbstractSingleThreadedWorkflowEventSource(String p_strGuid)
- Parameters:
p_strGuid
- The GUID of the event source.
-
-
Method Detail
-
getStopWaitTimeout
public long getStopWaitTimeout()
Get the stop wait timeout.Negative values indicate that the
stop()
method should not wait for the worker thread to stop.- Returns:
- The stop wait timeout.
-
setStopWaitTimeout
public void setStopWaitTimeout(long p_lStopWaitTimeout)
Set the stop wait timeout.Negative values indicate that the
stop()
method should not wait for the worker thread to stop.- Parameters:
p_lStopWaitTimeout
- The stop wait timeout.
-
isLogVerbose
public boolean isLogVerbose()
Description copied from interface:ILogLevelAware
This flag determines if verbose logging is turned on or off.- Specified by:
isLogVerbose
in interfaceILogLevelAware
- Returns:
true
if logging is verbose, orfalse
otherwise.
-
setLogVerbose
public void setLogVerbose(boolean p_bLogVerbose)
Description copied from interface:ILogLevelAware
This flag determines if verbose logging is turned on or off.- Specified by:
setLogVerbose
in interfaceILogLevelAware
- Parameters:
p_bLogVerbose
-true
if logging should be verbose, orfalse
otherwise.
-
getDatabaseConnectionFactory
public de.uplanet.jdbc.IDatabaseConnectionFactory getDatabaseConnectionFactory()
Get the database connection factory used by this event source.- Returns:
- The database connection factory used by this event source,
or
null
fo the default.
-
setDatabaseConnectionFactory
public void setDatabaseConnectionFactory(de.uplanet.jdbc.IDatabaseConnectionFactory p_connFactory)
Set the database connection factory used by this event source.- Parameters:
p_connFactory
- The database connection factory used by this event source.
-
getStartDelay
public long getStartDelay()
Get the start delay for this event source, i.e. the number of milliseconds that the worker thread waits until it really starts working by invoking the event source'srun()
method.- Returns:
- The start delay for this event source.
-
setStartDelay
public void setStartDelay(long p_lStartDelay)
Set start delay for this event source, i.e. the number of milliseconds that the worker thread waits until it really starts working by invoking the event source'srun()
method.- Parameters:
p_lStartDelay
- The start delay for this event source.
-
shouldRun
public boolean shouldRun()
Indicates if the worker thread should run or not.- Specified by:
shouldRun
in interfaceIRunnableWorkflowObject
- Returns:
true
if the worker thread should run, orfalse
otherwise.
-
start
public void start()
Description copied from interface:IStartableWorkflowObject
Start the workflow object.A call to this method must not throw an exception if the object is already running.
- Specified by:
start
in interfaceIStartableWorkflowObject
-
stop
public void stop()
Description copied from interface:IStartableWorkflowObject
Stop the workflow object.A call to this method must not throw an exception if the object is already stopped.
- Specified by:
stop
in interfaceIStartableWorkflowObject
-
isRunning
public boolean isRunning()
Description copied from interface:IStartableWorkflowObject
Check if the workflow object is running.- Specified by:
isRunning
in interfaceIStartableWorkflowObject
- Returns:
true
if the workflow object is running, orfalse
otherwise.
-
-