|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.component.AbstractComponent
public abstract class AbstractComponent
Abstract Component to be used by all Component implementations.
| Field Summary | |
|---|---|
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
|
| Fields inherited from interface org.mule.api.lifecycle.Initialisable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Startable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Stoppable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Disposable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.AnnotatedObject |
|---|
PROPERTY_NAME |
| Constructor Summary | |
|---|---|
AbstractComponent()
|
|
| Method Summary | |
|---|---|
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)
|
Object |
getAnnotation(QName name)
Gets the value of specified annotation. |
Map<QName,Object> |
getAnnotations()
Gets all annotations. |
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 |
setAnnotations(Map<QName,Object> newAnnotations)
Sets annotations to the object. |
void |
setFlowConstruct(FlowConstruct flowConstruct)
|
void |
setInterceptors(List<Interceptor> interceptors)
|
void |
setMuleContext(MuleContext context)
|
void |
start()
|
void |
stop()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected 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
| Constructor Detail |
|---|
public AbstractComponent()
| Method Detail |
|---|
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
MessageProcessor
process in interface MessageProcessorevent - MuleEvent to be processed
MuleException
protected MuleEvent createResultEvent(MuleEvent event,
Object result)
throws MuleException
MuleException
protected abstract Object doInvoke(MuleEvent event)
throws Exception
Exceptionpublic String toString()
toString in class Objectpublic void release()
public ComponentStatistics getStatistics()
Component
getStatistics 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 shutdown
RecoverableException - if an error occurs that can be recovered from
protected void doInitialise()
throws InitialisationException
InitialisationExceptionpublic void dispose()
Disposable
dispose in interface Disposableprotected void doDispose()
public void stop()
throws MuleException
stop in interface StoppableMuleException
protected void doStart()
throws MuleException
MuleException
public void start()
throws MuleException
start in interface StartableMuleException
protected void doStop()
throws MuleException
MuleException
protected void fireComponentNotification(MuleMessage message,
int action)
protected String getName()
public final Object getAnnotation(QName name)
AnnotatedObject
getAnnotation in interface AnnotatedObjectpublic final Map<QName,Object> getAnnotations()
AnnotatedObject
getAnnotations in interface AnnotatedObjectpublic final void setAnnotations(Map<QName,Object> newAnnotations)
AnnotatedObject
setAnnotations in interface AnnotatedObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||