public abstract class AbstractFlowConstruct extends AbstractAnnotatedObject implements FlowConstruct, Lifecycle
FlowConstruct that:
MuleContext.
MessageSource as the source of messages.
MessageProcessors to process messages.
MessageSource and
MessageProcessors in the correct order depending on the lifecycle phase.
ExceptionListener to be set.
AbstractFlowConstuct should implement
validateConstruct() validate the resulting construct. Validation may
include validation of the type of attributes of the MessageSource.
Implementations may also implement doInitialise(), doStart(),
doStop() and doDispose() if they need to perform any action on
lifecycle transitions.| Modifier and Type | Field and Description |
|---|---|
protected MessagingExceptionHandler |
exceptionListener |
static String |
INITIAL_STATE_STARTED |
static String |
INITIAL_STATE_STOPPED
The initial states that the flow can be started in
|
protected String |
initialState
Determines the initial state of this flow when the mule starts.
|
protected FlowConstructLifecycleManager |
lifecycleManager |
protected org.apache.commons.logging.Log |
logger |
protected MessageInfoMapping |
messageInfoMapping |
protected MuleContext |
muleContext |
protected String |
name |
protected FlowConstructStatistics |
statistics |
PHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAMEPROPERTY_NAME| Constructor and Description |
|---|
AbstractFlowConstruct(String name,
MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureStatistics() |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
protected void |
disposeIfDisposable(Object candidate) |
protected void |
doDispose() |
protected void |
doInitialise() |
protected void |
doStart() |
protected void |
doStop() |
abstract String |
getConstructType() |
MessagingExceptionHandler |
getExceptionListener() |
String |
getInitialState() |
LifecycleState |
getLifecycleState() |
MessageInfoMapping |
getMessageInfoMapping() |
MuleContext |
getMuleContext() |
String |
getName()
Gets the name of the object
|
FlowConstructStatistics |
getStatistics() |
void |
initialise()
Method used to perform any initialisation work.
|
protected void |
initialiseIfInitialisable(Object candidate) |
protected void |
injectExceptionHandler(Object candidate) |
protected void |
injectFlowConstructMuleContext(Object candidate) |
boolean |
isStarted() |
boolean |
isStopped() |
boolean |
isStopping() |
void |
setExceptionListener(MessagingExceptionHandler exceptionListener) |
void |
setInitialState(String initialState) |
void |
setMessageInfoMapping(MessageInfoMapping messageInfoMapping) |
void |
start() |
protected void |
startIfStartable(Object candidate) |
void |
stop() |
protected void |
stopIfStoppable(Object candidate) |
String |
toString() |
protected void |
validateConstruct()
Validates configured flow construct
|
getAnnotation, getAnnotations, setAnnotationsprotected transient org.apache.commons.logging.Log logger
protected String name
protected MessagingExceptionHandler exceptionListener
protected final FlowConstructLifecycleManager lifecycleManager
protected final MuleContext muleContext
protected FlowConstructStatistics statistics
protected MessageInfoMapping messageInfoMapping
public static final String INITIAL_STATE_STOPPED
public static final String INITIAL_STATE_STARTED
protected String initialState
public AbstractFlowConstruct(String name, MuleContext muleContext)
public final void initialise()
throws InitialisationException
InitialisableInitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise in interface InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered frompublic final void start()
throws MuleException
start in interface StartableMuleExceptionpublic final void stop()
throws MuleException
stop in interface StoppableMuleExceptionpublic final void dispose()
Disposabledispose in interface Disposablepublic boolean isStarted()
public boolean isStopped()
public boolean isStopping()
public String getName()
NamedObjectgetName in interface NamedObjectpublic MessagingExceptionHandler getExceptionListener()
getExceptionListener in interface FlowConstructpublic void setExceptionListener(MessagingExceptionHandler exceptionListener)
public String getInitialState()
public void setInitialState(String initialState)
public LifecycleState getLifecycleState()
getLifecycleState in interface LifecycleStateEnabledpublic MuleContext getMuleContext()
getMuleContext in interface FlowConstructpublic FlowConstructStatistics getStatistics()
getStatistics in interface FlowConstructpublic MessageInfoMapping getMessageInfoMapping()
getMessageInfoMapping in interface FlowConstructMessageInfoMapping used to control how Important message
information is pulled from the current message.public void setMessageInfoMapping(MessageInfoMapping messageInfoMapping)
protected void doInitialise()
throws MuleException
MuleExceptionprotected void configureStatistics()
protected void doStart()
throws MuleException
MuleExceptionprotected void doStop()
throws MuleException
MuleExceptionprotected void doDispose()
protected void validateConstruct()
throws FlowConstructInvalidException
FlowConstructInvalidException - if the flow construct does not pass
validationprotected void injectFlowConstructMuleContext(Object candidate)
protected void injectExceptionHandler(Object candidate)
protected void initialiseIfInitialisable(Object candidate) throws InitialisationException
InitialisationExceptionprotected void startIfStartable(Object candidate) throws MuleException
MuleExceptionprotected void stopIfStoppable(Object candidate) throws MuleException
MuleExceptionprotected void disposeIfDisposable(Object candidate)
public abstract String getConstructType()
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.