public interface ObjectFactory
extends org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Disposable
ObjectFactory is a generic Factory interface.| Modifier and Type | Method and Description |
|---|---|
void |
addObjectInitialisationCallback(InitialisationCallback callback)
Register a custom initialiser
|
Object |
getInstance(MuleContext muleContext)
Retrieve an instance of the object.
|
Class<?> |
getObjectClass()
Returns the class of the object to be instantiated without actually creating an instance.
|
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.
|
Object getInstance(MuleContext muleContext) throws Exception
muleContext - 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 instanceClass<?> getObjectClass()
boolean isSingleton()
boolean isExternallyManagedLifecycle()
boolean isAutoWireObject()
void addObjectInitialisationCallback(InitialisationCallback callback)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.