|
||||||||||
| 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.eventdriven.EventDrivenInitiatorImpl
public class EventDrivenInitiatorImpl
Event Driven Initiator implementation.
| Field Summary | |
|---|---|
protected org.ikasan.framework.initiator.eventdriven.EventDrivenInitiatorImpl.Anesthetist |
anesthetist
The Anesthetist for stopping/starting the message listener container in a retry cycle |
static String |
EVENT_DRIVEN_INITIATOR_TYPE
|
protected org.ikasan.framework.initiator.eventdriven.EventDrivenInitiatorImpl.Halt |
halt
The Halt for activating/deactivating the jms endpoint |
protected MessageEndpointManager |
messageEndpointManager
message endpoint manager |
| Fields inherited from class org.ikasan.framework.initiator.AbstractInitiator |
|---|
error, errorLoggingService, EXCEPTION_ACTION_IMPLIED_ROLLBACK, exceptionHandler, excludedEventService, exclusions, flow, moduleName, monitorListeners, name, retryCount, stopping, UNSUPPORTED_EXCLUDE_ENCONTERED |
| Constructor Summary | |
|---|---|
EventDrivenInitiatorImpl(String moduleName,
String name,
Flow flow,
IkasanExceptionHandler exceptionHandler)
Constructor |
|
| Method Summary | |
|---|---|
protected boolean |
anesthetistOperating()
Return true if the anesthetist is operating |
protected void |
cancelRetryCycle()
Cancels retry activity |
protected void |
completeRetryCycle()
Cancel the retry activity, and resume any business as usual activity |
protected void |
continueRetryCycle(long delay)
Template method for subclasses to selectively override |
protected org.apache.log4j.Logger |
getLogger()
Provides access to the implementation class specific logger instance |
MessageEndpointManager |
getMessageEndpointManager()
Accessor for messageEndpointManager |
String |
getType()
Returns the type of the initiator |
boolean |
isRecovering()
Is this initiator in a recovering state. |
boolean |
isRunning()
Is this initiator running. |
void |
onEvent(Event event)
Ikasan event listener |
void |
onException(Throwable throwable)
Ikasan exception listener |
void |
setMessageEndpointManager(MessageEndpointManager messageEndpointManager)
|
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 |
stopInError()
Sets the error flag before stopping the initiator |
protected void |
stopInitiator()
Only the extending class knows how to stop the initiator. |
| Methods inherited from class org.ikasan.framework.initiator.AbstractInitiator |
|---|
addListener, getExceptionHandler, getExclusions, getFlow, getHandledEventCount, getLastEventTime, getModuleName, getMonitorListeners, getName, getRetryCount, getState, handleAction, handleRetry, invokeFlow, invokeFlow, isError, isStopping, logError, notifyMonitorListeners, removeListener, resume, setErrorLoggingService, setExcludedEventService, start, stop, 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 EVENT_DRIVEN_INITIATOR_TYPE
protected MessageEndpointManager messageEndpointManager
protected org.ikasan.framework.initiator.eventdriven.EventDrivenInitiatorImpl.Anesthetist anesthetist
protected org.ikasan.framework.initiator.eventdriven.EventDrivenInitiatorImpl.Halt halt
| Constructor Detail |
|---|
public EventDrivenInitiatorImpl(String moduleName,
String name,
Flow flow,
IkasanExceptionHandler exceptionHandler)
moduleName - The name of the modulename - The name of this initiatorflow - The name of the flow it starts| Method Detail |
|---|
public String getType()
Initiator
getType in interface Initiatorpublic void onException(Throwable throwable)
ExceptionListener
onException in interface ExceptionListenerpublic void onEvent(Event event)
EventListener
onEvent in interface EventListenerprotected void completeRetryCycle()
AbstractInitiator
completeRetryCycle in class AbstractInitiator
protected void startRetryCycle(Integer maxAttempts,
long delay)
AbstractInitiator
startRetryCycle in class AbstractInitiatordelay - The delay in milliseconds before we perform a retryprotected void continueRetryCycle(long delay)
AbstractInitiator
continueRetryCycle in class AbstractInitiatorprotected void cancelRetryCycle()
AbstractInitiator
cancelRetryCycle in class AbstractInitiatorpublic boolean isRecovering()
Initiator
isRecovering in interface Initiatorpublic boolean isRunning()
Initiator
isRunning in interface Initiatorprotected boolean anesthetistOperating()
protected void startInitiator()
AbstractInitiator
startInitiator in class AbstractInitiatorprotected void stopInitiator()
AbstractInitiator
stopInitiator in class AbstractInitiatorprotected void stopInError()
stopInError in class AbstractInitiatorpublic void setMessageEndpointManager(MessageEndpointManager messageEndpointManager)
messageEndpointManager - public MessageEndpointManager getMessageEndpointManager()
getMessageEndpointManager in interface EventDrivenInitiatorprotected org.apache.log4j.Logger getLogger()
AbstractInitiator
getLogger in class AbstractInitiator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||