public abstract class AbstractComponent extends AbstractAnnotatedObject implements Component, MuleContextAware, Lifecycle, MessagingExceptionHandlerAware
| Modifier and Type | Field and Description |
|---|---|
protected FlowConstruct |
flowConstruct |
protected MessageProcessorChain |
interceptorChain |
protected List<Interceptor> |
interceptors |
protected ComponentLifecycleManager |
lifecycleManager |
protected org.apache.commons.logging.Log |
logger
logger used by this class
|
protected MuleContext |
muleContext |
protected ServerNotificationHandler |
notificationHandler |
protected ComponentStatistics |
statistics |
PHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAMEPROPERTY_NAME| Constructor and Description |
|---|
AbstractComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyLifecycleAndDependencyInjection(Object object) |
protected MuleEvent |
createResultEvent(MuleEvent event,
Object result) |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
protected void |
doDispose() |
protected void |
doInitialise() |
protected abstract Object |
doInvoke(MuleEvent event) |
protected void |
doStart() |
protected void |
doStop() |
protected void |
fireComponentNotification(MuleMessage message,
int action) |
FlowConstruct |
getFlowConstruct() |
List<Interceptor> |
getInterceptors() |
protected String |
getName() |
ComponentStatistics |
getStatistics()
Component statistics are used to gather component statistics such as
sync/async invocation counts and total and average execution time.
|
void |
initialise()
Method used to perform any initialisation work.
|
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor.
|
void |
release() |
void |
setFlowConstruct(FlowConstruct flowConstruct) |
void |
setInterceptors(List<Interceptor> interceptors) |
void |
setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler) |
void |
setMuleContext(MuleContext context) |
void |
start() |
void |
stop() |
String |
toString() |
getAnnotation, getAnnotations, setAnnotationsprotected final org.apache.commons.logging.Log logger
protected FlowConstruct flowConstruct
protected ComponentStatistics statistics
protected ServerNotificationHandler notificationHandler
protected List<Interceptor> interceptors
protected MessageProcessorChain interceptorChain
protected MuleContext muleContext
protected ComponentLifecycleManager lifecycleManager
public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic List<Interceptor> getInterceptors()
public void setInterceptors(List<Interceptor> interceptors)
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessorprocess in interface MessageProcessorevent - MuleEvent to be processedMuleExceptionprotected MuleEvent createResultEvent(MuleEvent event, Object result) throws MuleException
MuleExceptionpublic void release()
public ComponentStatistics getStatistics()
ComponentgetStatistics in interface Componentpublic void setFlowConstruct(FlowConstruct flowConstruct)
setFlowConstruct in interface FlowConstructAwarepublic FlowConstruct getFlowConstruct()
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 fromprotected void applyLifecycleAndDependencyInjection(Object object) throws InitialisationException
InitialisationExceptionprotected void doInitialise()
throws InitialisationException
InitialisationExceptionpublic void dispose()
Disposabledispose in interface Disposableprotected void doDispose()
public void stop()
throws MuleException
stop in interface StoppableMuleExceptionprotected void doStart()
throws MuleException
MuleExceptionpublic void start()
throws MuleException
start in interface StartableMuleExceptionprotected void doStop()
throws MuleException
MuleExceptionprotected void fireComponentNotification(MuleMessage message, int action)
protected String getName()
public void setMessagingExceptionHandler(MessagingExceptionHandler messagingExceptionHandler)
setMessagingExceptionHandler in interface MessagingExceptionHandlerAwareCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.