org.mule.component
Class AbstractComponent
java.lang.Object
org.mule.component.AbstractComponent
- All Implemented Interfaces:
- Component, Disposable, Initialisable, Lifecycle, Startable, Stoppable
- Direct Known Subclasses:
- AbstractJavaComponent, PassThroughComponent
public abstract class AbstractComponent
- extends Object
- implements Component
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 Log |
logger
logger used by this class |
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
|
logger
protected final Log logger
- logger used by this class
service
protected Service service
statistics
protected ComponentStatistics statistics
started
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean started
stopping
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean stopping
initialised
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean initialised
disposing
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean disposing
disposed
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean disposed
AbstractComponent
public AbstractComponent()
onCall
public MuleMessage onCall(MuleEvent event)
throws MuleException
- Description copied from interface:
Component
- Invokes the component
- Specified by:
onCall
in interface Component
- Parameters:
event
- the event used to invoke the component
- Returns:
- the return event from the component
- Throws:
MuleException
- if the call fails
doOnCall
protected abstract MuleMessage doOnCall(MuleEvent event)
throws Exception
- Throws:
Exception
toString
public String toString()
- Overrides:
toString
in class Object
release
public void release()
getStatistics
public ComponentStatistics getStatistics()
- Description copied from interface:
Component
- Component statistics are used to gather component statistics such as
sync/async invocation counts and total and average execution time.
- Specified by:
getStatistics
in interface Component
- Returns:
setService
public void setService(Service service)
- Specified by:
setService
in interface Component
getService
public Service getService()
- Specified by:
getService
in interface Component
- Returns:
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException
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.
- Specified by:
initialise
in interface Initialisable
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
doInitialise
protected void doInitialise()
throws InitialisationException
- Throws:
InitialisationException
dispose
public void dispose()
- Description copied from interface:
Disposable
- A lifecycle method where implementor should free up any resources. If an
exception is thrown it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose
in interface Disposable
doDispose
protected void doDispose()
stop
public void stop()
throws MuleException
- Specified by:
stop
in interface Stoppable
- Throws:
MuleException
doStart
protected void doStart()
throws MuleException
- Throws:
MuleException
start
public void start()
throws MuleException
- Specified by:
start
in interface Startable
- Throws:
MuleException
doStop
protected void doStop()
throws MuleException
- Throws:
MuleException
checkDisposed
protected void checkDisposed()
throws DisposeException
- Throws:
DisposeException
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.