protected class PooledJavaComponent.LifeCycleAdaptorFactory extends Object implements ObjectFactory
LifeCycleAdaptorFactory
wraps the Component' s
ObjectFactory
. The LifeCycleAdaptorFactory "getInstance()" method
creates a new LifecycleAdapter
wrapping the object instance obtained
for the component instance ObjectFactory
set on the Component
.LifecycleAdapter
creation in the Component and
out of the DefaultLifecyleEnabledObjectPool
and to use the generic
ObjectPool
interface.PHASE_NAME
PHASE_NAME
Modifier | Constructor and Description |
---|---|
protected |
PooledJavaComponent.LifeCycleAdaptorFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addObjectInitialisationCallback(InitialisationCallback callback)
Register a custom initialiser
|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
Object |
getInstance()
Retrieve an instance of the object.
|
Class |
getObjectClass()
Returns the class of the object to be instantiated without actually creating
an instance.
|
void |
initialise()
Method used to perform any initialisation work.
|
boolean |
isSingleton()
Returns true if the ObjectFactory implementation always returns the same object
instance.
|
protected PooledJavaComponent.LifeCycleAdaptorFactory()
public Object getInstance() throws Exception
ObjectFactory
getInstance
in interface ObjectFactory
Exception
public Class getObjectClass()
ObjectFactory
getObjectClass
in interface ObjectFactory
public void initialise() throws InitialisationException
Initialisable
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.initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic void dispose()
Disposable
dispose
in interface Disposable
public void addObjectInitialisationCallback(InitialisationCallback callback)
ObjectFactory
addObjectInitialisationCallback
in interface ObjectFactory
public boolean isSingleton()
ObjectFactory
isSingleton
in interface ObjectFactory
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.