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.Modifier and Type | Field and Description |
---|---|
protected JavaComponent |
component |
protected Object |
componentObject |
protected static org.apache.commons.logging.Log |
logger
logger used by this class
|
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
DefaultLifecycleAdapter(Object componentObject,
JavaComponent component) |
DefaultLifecycleAdapter(Object componentObject,
JavaComponent component,
EntryPointResolverSet entryPointResolver) |
Modifier and Type | Method and Description |
---|---|
protected void |
configureNestedRouter() |
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. |
MuleMessage |
intercept(Invocation invocation)
Invoked when the component should be called.
|
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. |
protected static final org.apache.commons.logging.Log logger
protected Object componentObject
protected JavaComponent component
public DefaultLifecycleAdapter(Object componentObject, JavaComponent component) throws MuleException
MuleException
public DefaultLifecycleAdapter(Object componentObject, JavaComponent component, EntryPointResolverSet entryPointResolver) throws MuleException
MuleException
public void start() throws MuleException
Startable
interface. NOT: It is up to component
implementations to ensure their implementation of start() is thread-safe.start
in interface Startable
MuleException
public void stop() throws MuleException
Stoppable
interface. NOT: It is up to component
implementations to ensure their implementation of stop() is thread-safe.stop
in interface Stoppable
MuleException
public void dispose()
Disposable
interface. NOT: It is up to component
implementations to ensure their implementation of dispose() is thread-safe.dispose
in interface Disposable
public boolean isStarted()
isStarted
in interface LifecycleAdapter
public boolean isDisposed()
isDisposed
in interface LifecycleAdapter
public MuleMessage intercept(Invocation invocation) throws MuleException
Interceptor
Invocation.execute()
to call the component.intercept
in interface Interceptor
invocation
- the invocation containing info about the current message and
serviceMuleException
- if the invocation failspublic void initialise() throws InitialisationException
Initialisable
interface.
NOTE: It is up to component implementations to ensure their implementation of
initialise()
is thread-safe.initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered fromprotected void configureNestedRouter() throws MuleException
MuleException
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.