org.mule.component
Class DefaultLifecycleAdapter
java.lang.Object
org.mule.component.DefaultLifecycleAdapter
- All Implemented Interfaces:
- LifecycleAdapter, Disposable, Initialisable, Lifecycle, Startable, Stoppable
- Direct Known Subclasses:
- NullLifecycleAdapter
public class DefaultLifecycleAdapter
- extends Object
- implements LifecycleAdapter
DefaultLifecycleAdapter
provides lifecycle methods for all Mule
managed components. It's possible to plugin custom lifecycle adapters, this can
provide additional lifecycle methods triggered by an external source.
Method Summary |
protected void |
configureBinding()
|
void |
dispose()
Propagates dispose() life-cycle to component object implementations if they
implement the mule Disposable interface. |
void |
initialise()
Propagates initialise() life-cycle to component object implementations if they
implement the mule Initialisable interface. |
Object |
invoke(MuleEvent event)
|
boolean |
isDisposed()
|
boolean |
isStarted()
|
void |
start()
Propagates start() life-cycle to component object implementations if they
implement the mule Startable interface. |
void |
stop()
Propagates stop() life-cycle to component object implementations if they
implement the mule Stoppable interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final Log logger
- logger used by this class
componentObject
protected Object componentObject
component
protected JavaComponent component
entryPointResolver
protected EntryPointResolverSet entryPointResolver
DefaultLifecycleAdapter
public DefaultLifecycleAdapter(Object componentObject,
JavaComponent component,
MuleContext muleContext)
throws MuleException
- Throws:
MuleException
DefaultLifecycleAdapter
public DefaultLifecycleAdapter(Object componentObject,
JavaComponent component,
EntryPointResolverSet entryPointResolver,
MuleContext muleContext)
throws MuleException
- Throws:
MuleException
start
public void start()
throws MuleException
- Propagates start() life-cycle to component object implementations if they
implement the mule
Startable
interface. NOT: It is up to component
implementations to ensure their implementation of start() is thread-safe.
- Specified by:
start
in interface Startable
- Throws:
MuleException
stop
public void stop()
throws MuleException
- Propagates stop() life-cycle to component object implementations if they
implement the mule
Stoppable
interface. NOT: It is up to component
implementations to ensure their implementation of stop() is thread-safe.
- Specified by:
stop
in interface Stoppable
- Throws:
MuleException
dispose
public void dispose()
- Propagates dispose() life-cycle to component object implementations if they
implement the mule
Disposable
interface. NOT: It is up to component
implementations to ensure their implementation of dispose() is thread-safe.
- Specified by:
dispose
in interface Disposable
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interface LifecycleAdapter
- Returns:
- true if the service has been started
isDisposed
public boolean isDisposed()
- Specified by:
isDisposed
in interface LifecycleAdapter
- Returns:
- whether the service managed by this lifecycle has been disposed
invoke
public Object invoke(MuleEvent event)
throws MuleException
- Specified by:
invoke
in interface LifecycleAdapter
- Throws:
MuleException
initialise
public void initialise()
throws InitialisationException
- Propagates initialise() life-cycle to component object implementations if they
implement the mule
Initialisable
interface.
NOTE: It is up to component implementations to ensure their implementation of
initialise()
is thread-safe.
- 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
configureBinding
protected void configureBinding()
throws MuleException
- Throws:
MuleException
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.