public abstract class AbstractComponent extends Object implements Component
| Modifier and Type | Field and Description |
|---|---|
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 org.apache.commons.logging.Log |
logger
logger used by this class
|
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 |
PHASE_NAMEPHASE_NAMEPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
AbstractComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkDisposed() |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
protected void |
doDispose() |
protected void |
doInitialise() |
protected abstract MuleMessage |
doOnCall(MuleEvent event) |
protected void |
doStart() |
protected void |
doStop() |
protected void |
fireComponentNotification(MuleMessage message,
int action) |
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 |
onCall(MuleEvent event)
Invokes the component
|
void |
release() |
void |
setService(Service service) |
void |
start() |
void |
stop() |
String |
toString() |
protected final org.apache.commons.logging.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
public MuleMessage onCall(MuleEvent event) throws MuleException
ComponentonCall in interface Componentevent - the event used to invoke the componentMuleException - if the call failsprotected abstract MuleMessage doOnCall(MuleEvent event) throws Exception
Exceptionpublic void release()
public ComponentStatistics getStatistics()
ComponentgetStatistics in interface Componentpublic void setService(Service service)
setService in interface Componentpublic Service getService()
getService in interface Componentpublic 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 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 checkDisposed()
throws DisposeException
DisposeExceptionprotected void fireComponentNotification(MuleMessage message, int action)
Copyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.