|
||||||||||
| 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.SimpleInitiator
public class SimpleInitiator
Experimental implementation of Initiator that is invoked directly with content
| Field Summary | |
|---|---|
static String |
SIMPLE_INITIATOR_TYPE
|
| Fields inherited from class org.ikasan.framework.initiator.AbstractInitiator |
|---|
error, errorLoggingService, EXCEPTION_ACTION_IMPLIED_ROLLBACK, exceptionHandler, excludedEventService, exclusions, monitorListeners, name, retryCount, stopping, UNSUPPORTED_EXCLUDE_ENCONTERED |
| Constructor Summary | |
|---|---|
SimpleInitiator(String initiatorName,
String moduleName,
PayloadFactory payloadFactory,
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 |
Flow |
getFlow()
Returns the flow that this invokes |
protected org.apache.log4j.Logger |
getLogger()
Provides access to the implementation class specific logger instance |
String |
getName()
The flow initiator's name. |
Integer |
getRetryCount()
Accessor for retryCount |
InitiatorState |
getState()
Returns the current state of the Initiator |
String |
getType()
Returns the type of the initiator |
boolean |
initiate(String originationId,
String payloadContent)
|
boolean |
isAvailable()
Accessor for available |
boolean |
isError()
Is this initiator in an error state. |
boolean |
isRecovering()
Is this initiator in a recovering state. |
boolean |
isRunning()
Is this initiator running. |
void |
setAvailable(boolean available)
Setter for available |
void |
setBeanName(String beanName)
|
void |
start()
Start this initiator. |
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. |
void |
stop()
Stop this initiator. |
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, getHandledEventCount, getLastEventTime, getModuleName, getMonitorListeners, handleAction, handleRetry, invokeFlow, invokeFlow, isStopping, logError, notifyMonitorListeners, removeListener, resume, setErrorLoggingService, setExcludedEventService, 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, getHandledEventCount, getLastEventTime |
| Field Detail |
|---|
public static final String SIMPLE_INITIATOR_TYPE
| Constructor Detail |
|---|
public SimpleInitiator(String initiatorName,
String moduleName,
PayloadFactory payloadFactory,
Flow flow,
IkasanExceptionHandler exceptionHandler)
available - moduleName - payloadFactory - flow - | Method Detail |
|---|
public boolean initiate(String originationId,
String payloadContent)
public boolean isAvailable()
public void setAvailable(boolean available)
available - public Flow getFlow()
Initiator
getFlow in interface InitiatorgetFlow in class AbstractInitiatorpublic String getName()
Initiator
getName in interface InitiatorgetName in class AbstractInitiatorpublic boolean isError()
Initiator
isError in interface InitiatorisError in class AbstractInitiatorpublic boolean isRecovering()
Initiator
isRecovering in interface Initiatorpublic boolean isRunning()
Initiator
isRunning in interface Initiatorpublic void start()
Initiator
start in interface Initiatorstart in class AbstractInitiatorpublic void stop()
Initiator
stop in interface Initiatorstop in class AbstractInitiatorpublic void setBeanName(String beanName)
public InitiatorState getState()
Initiator
getState in interface InitiatorgetState in class AbstractInitiatorpublic String getType()
Initiator
getType in interface Initiatorpublic Integer getRetryCount()
AbstractInitiator
getRetryCount in interface InitiatorgetRetryCount in class AbstractInitiator
protected void stopInitiator()
throws InitiatorOperationException
AbstractInitiator
stopInitiator in class AbstractInitiatorInitiatorOperationException - Excetpion if we cannot stop initiatorprotected void cancelRetryCycle()
AbstractInitiator
cancelRetryCycle in class AbstractInitiatorprotected void completeRetryCycle()
AbstractInitiator
completeRetryCycle in class AbstractInitiatorprotected org.apache.log4j.Logger getLogger()
AbstractInitiator
getLogger in class AbstractInitiator
protected void startInitiator()
throws InitiatorOperationException
AbstractInitiator
startInitiator in class AbstractInitiatorInitiatorOperationException - Exception if we cannot start initiator
protected void startRetryCycle(Integer maxAttempts,
long delay)
throws InitiatorOperationException
AbstractInitiator
startRetryCycle in class AbstractInitiatordelay - The delay in milliseconds before we perform a retry
InitiatorOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||