public abstract class AbstractFlowConstruct extends org.mule.runtime.api.meta.AbstractAnnotatedObject implements FlowConstruct, org.mule.runtime.api.lifecycle.Lifecycle
FlowConstruct that:
MuleContext.
MessageSource as the source of messages.
Processors to process messages.
MessageSource and Processors 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 |
protected String |
initialState
Determines the initial state of this flow when the mule starts.
|
protected static org.slf4j.Logger |
LOGGER |
protected MuleContext |
muleContext |
protected String |
name |
protected FlowConstructStatistics |
statistics |
| Constructor and Description |
|---|
AbstractFlowConstruct(String name,
MuleContext muleContext) |
protected static final org.slf4j.Logger LOGGER
protected String name
protected MessagingExceptionHandler exceptionListener
protected final MuleContext muleContext
protected FlowConstructStatistics statistics
protected String initialState
public AbstractFlowConstruct(String name, MuleContext muleContext)
public final void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic final void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic final void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic final void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic boolean isStarted()
public boolean isStopped()
public boolean isStopping()
public String getName()
getName in interface org.mule.runtime.api.meta.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 FlowConstructprotected void doInitialise()
throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionprotected void configureStatistics()
protected void doStart()
throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionprotected void doStop()
throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.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)
public String getUniqueIdString()
FlowConstructgetUniqueIdString in interface FlowConstructpublic String getServerId()
getServerId in interface FlowConstructprotected void initialiseIfInitialisable(Object candidate) throws org.mule.runtime.api.lifecycle.InitialisationException
org.mule.runtime.api.lifecycle.InitialisationExceptionprotected void startIfStartable(Object candidate) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionprotected void stopIfStoppable(Object candidate) throws org.mule.runtime.api.exception.MuleException
org.mule.runtime.api.exception.MuleExceptionprotected void disposeIfDisposable(Object candidate)
public abstract String getConstructType()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.