|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ikasan.framework.initiator.AbstractInitiator
org.ikasan.framework.initiator.scheduled.quartz.QuartzStatefulScheduledDrivenInitiator
public class QuartzStatefulScheduledDrivenInitiator
Quartz implementation of an Ikasan Schedule Driven Initiator.
| Field Summary | |
|---|---|
protected EventProvider |
eventProvider
|
static String |
QUARTZ_SCHEDULE_DRIVEN_INITIATOR_TYPE
|
static String |
REINVOKE_IMMEDIATELY_FLAG
|
protected org.quartz.Scheduler |
scheduler
Quartz scheduler |
| Fields inherited from class org.ikasan.framework.initiator.AbstractInitiator |
|---|
error, errorLoggingService, EXCEPTION_ACTION_IMPLIED_ROLLBACK, excludedEventService, exclusions, flow, moduleName, monitorListeners, name, retryCount, stopping, UNSUPPORTED_EXCLUDE_ENCONTERED |
| Constructor Summary | |
|---|---|
QuartzStatefulScheduledDrivenInitiator(String initiatorName,
String moduleName,
EventProvider eventProvider,
Flow flow,
IkasanExceptionHandler exceptionHandler)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
cancelRetryCycle()
Cancels retry activity |
protected void |
completeRetryCycle()
Cancel the retry activity, and resume any business as usual activity |
String |
getInitiatorJobName()
Returns the Quartz job name of this initiator |
protected org.apache.log4j.Logger |
getLogger()
Provides access to the implementation class specific logger instance |
org.quartz.Scheduler |
getScheduler()
Provides access to the underlying scheduler |
String |
getType()
Returns the type of the initiator |
boolean |
invoke()
Standard invocation of an initiator. |
boolean |
isAllowImmediateReinvocationOnEvent()
Accessor for allowImmediateReinvocationOnEvent |
boolean |
isRecovering()
Is this initiator in a recovering state. |
boolean |
isRunning()
Is this initiator running. |
void |
setAllowImmediateReinvocationOnEvent(boolean allowImmediateReinvocationOnEvent)
Setter for allowImmediateReinvocationOnEventS |
void |
setScheduler(org.quartz.Scheduler scheduler)
Setter for scheduler |
void |
setTriggers(List<org.quartz.Trigger> triggers)
|
protected void |
startInitiator()
Only the extending class knows how to start the initiator. |
protected void |
startRetryCycle(Integer maxAttempts,
long delay)
Initiator needs to start a retry cycle due to an exception action. |
protected void |
stopInitiator()
Only the extending class knows how to stop the initiator. |
| Methods inherited from class org.ikasan.framework.initiator.AbstractInitiator |
|---|
addListener, continueRetryCycle, getExceptionHandler, getExclusions, getFlow, getHandledEventCount, getLastEventTime, getModuleName, getMonitorListeners, getName, getRetryCount, getState, handleAction, handleRetry, invokeFlow, invokeFlow, isError, isStopping, logError, notifyMonitorListeners, removeListener, resume, setErrorLoggingService, setExcludedEventService, start, stop, stopInError, supportsExclusions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.ikasan.framework.initiator.Initiator |
|---|
getExceptionHandler, getFlow, getHandledEventCount, getLastEventTime, getName, getRetryCount, getState, isError, start, stop |
| Methods inherited from interface org.ikasan.framework.monitor.MonitorSubject |
|---|
addListener, removeListener |
| Field Detail |
|---|
public static final String QUARTZ_SCHEDULE_DRIVEN_INITIATOR_TYPE
public static final String REINVOKE_IMMEDIATELY_FLAG
protected EventProvider eventProvider
protected org.quartz.Scheduler scheduler
| Constructor Detail |
|---|
public QuartzStatefulScheduledDrivenInitiator(String initiatorName,
String moduleName,
EventProvider eventProvider,
Flow flow,
IkasanExceptionHandler exceptionHandler)
initiatorName - The name of the initiatorname - of the ModuleeventProvider - The provider of the events to this initiatorflow - The flow leading from this initiatorexceptionHandler - The exception handler for this initiator| Method Detail |
|---|
public void setScheduler(org.quartz.Scheduler scheduler)
scheduler - The scheduler to set
org.quartz.SchedulerException
protected void startRetryCycle(Integer maxAttempts,
long delay)
throws InitiatorOperationException
AbstractInitiator
startRetryCycle in class AbstractInitiatordelay - The delay in milliseconds before we perform a retry
InitiatorOperationException
protected void completeRetryCycle()
throws InitiatorOperationException
AbstractInitiator
completeRetryCycle in class AbstractInitiatorInitiatorOperationException
protected void cancelRetryCycle()
throws InitiatorOperationException
AbstractInitiator
cancelRetryCycle in class AbstractInitiatorInitiatorOperationException
protected void stopInitiator()
throws InitiatorOperationException
AbstractInitiator
stopInitiator in class AbstractInitiatorInitiatorOperationException - Excetpion if we cannot stop initiator
protected void startInitiator()
throws InitiatorOperationException
AbstractInitiator
startInitiator in class AbstractInitiatorInitiatorOperationException - Exception if we cannot start initiatorpublic String getType()
Initiator
getType in interface Initiatorpublic boolean isRecovering()
Initiator
isRecovering in interface Initiatorpublic org.quartz.Scheduler getScheduler()
getScheduler in interface QuartzDrivenInitiatorpublic boolean isRunning()
Initiator
isRunning in interface Initiatorprotected org.apache.log4j.Logger getLogger()
AbstractInitiator
getLogger in class AbstractInitiatorpublic void setTriggers(List<org.quartz.Trigger> triggers)
public boolean invoke()
invoke in interface QuartzDrivenInitiatormergedJobDataMap -
public boolean isAllowImmediateReinvocationOnEvent()
public void setAllowImmediateReinvocationOnEvent(boolean allowImmediateReinvocationOnEvent)
allowImmediateReinvocationOnEvent - public String getInitiatorJobName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||