protected class PooledJavaComponent.LifeCycleAdapterFactory 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
DefaultLifecycleEnabledObjectPool and to use the generic ObjectPool interface.| Modifier | Constructor and Description |
|---|---|
protected |
LifeCycleAdapterFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
addObjectInitialisationCallback(InitialisationCallback callback)
Register a custom initialiser
|
void |
dispose() |
Object |
getInstance(MuleContext context)
Retrieve an instance of the object.
|
Class<?> |
getObjectClass()
Returns the class of the object to be instantiated without actually creating an instance.
|
void |
initialise() |
boolean |
isAutoWireObject()
Return true if the created object should get its dependencies wired from the registry automatically.
|
boolean |
isExternallyManagedLifecycle()
Returns true if Mule should not manage the life-cycle the object instance returned from the ObjectFactory.
|
boolean |
isSingleton()
Returns true if the ObjectFactory implementation always returns the same object instance.
|
public Object getInstance(MuleContext context) throws Exception
ObjectFactorygetInstance in interface ObjectFactorycontext - the current MuleContext instance. This can be used for performing
registry look-ups applying processors to newly created objects or even firing custom notificationsException - if there is an exception thrown creating the new instancepublic Class<?> getObjectClass()
ObjectFactorygetObjectClass in interface ObjectFactorypublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic void addObjectInitialisationCallback(InitialisationCallback callback)
ObjectFactoryaddObjectInitialisationCallback in interface ObjectFactorypublic boolean isSingleton()
ObjectFactoryisSingleton in interface ObjectFactorypublic boolean isExternallyManagedLifecycle()
ObjectFactoryisExternallyManagedLifecycle in interface ObjectFactorypublic boolean isAutoWireObject()
ObjectFactoryisAutoWireObject in interface ObjectFactoryCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.