|
||||||||||
| 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 edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
disposed
|
protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
disposing
|
protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
initialised
|
protected List |
interceptors
|
protected Log |
logger
logger used by this class |
protected MuleContext |
muleContext
|
protected ServerNotificationHandler |
notificationHandler
|
protected Service |
service
|
protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
started
|
protected ComponentStatistics |
statistics
|
protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
stopping
|
| 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 |
| Constructor Summary | |
|---|---|
AbstractComponent()
|
|
| Method Summary | |
|---|---|
protected void |
checkDisposed()
|
protected MuleMessage |
createResultMessage(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)
|
List |
getInterceptors()
|
Service |
getService()
|
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. |
MuleMessage |
intercept(Invocation invocation)
Invoked when the component should be called. |
MuleMessage |
invoke(MuleEvent event)
Invokes the component |
void |
release()
|
void |
setInterceptors(List interceptors)
|
void |
setMuleContext(MuleContext context)
|
void |
setService(Service service)
|
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 Log logger
protected Service service
protected ComponentStatistics statistics
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean started
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean stopping
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean initialised
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean disposing
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean disposed
protected ServerNotificationHandler notificationHandler
protected List interceptors
protected MuleContext muleContext
| Constructor Detail |
|---|
public AbstractComponent()
| Method Detail |
|---|
public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic List getInterceptors()
public void setInterceptors(List interceptors)
public MuleMessage intercept(Invocation invocation)
throws MuleException
InterceptorInvocation.invoke() to call the component.
intercept in interface Interceptorinvocation - the invocation containing info about the current message and
service
MuleException - if the invocation fails
public MuleMessage invoke(MuleEvent event)
throws MuleException
Component
invoke in interface Componentevent - the event used to invoke the component
MuleException - if the call fails
protected MuleMessage createResultMessage(MuleEvent event,
Object result)
throws TransformerException
TransformerException
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 setService(Service service)
setService in interface Componentpublic Service getService()
getService in interface Component
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 checkDisposed()
throws DisposeException
DisposeException
protected void fireComponentNotification(MuleMessage message,
int action)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||