|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.object.AbstractObjectFactory
public abstract class AbstractObjectFactory
Creates object instances based on the class and sets any properties.
Field Summary | |
---|---|
static String |
ATTRIBUTE_OBJECT_CLASS
|
static String |
ATTRIBUTE_OBJECT_CLASS_NAME
|
protected List |
initialisationCallbacks
|
protected Log |
logger
|
protected Class |
objectClass
|
protected String |
objectClassName
|
protected Map |
properties
|
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
AbstractObjectFactory()
For Spring only |
|
AbstractObjectFactory(Class objectClass)
|
|
AbstractObjectFactory(Class objectClass,
Map properties)
|
|
AbstractObjectFactory(String objectClassName)
|
|
AbstractObjectFactory(String objectClassName,
Map properties)
|
Method Summary | |
---|---|
void |
addObjectInitialisationCallback(InitialisationCallback callback)
Register a custom initialiser |
void |
dispose()
A lifecycle method where implementor should free up any resources. |
protected void |
fireInitialisationCallbacks(Object component)
|
Object |
getInstance()
Creates an initialized object instance based on the class and sets any properties. |
Class |
getObjectClass()
Returns the class of the object to be instantiated without actually creating an instance. |
protected String |
getObjectClassName()
|
protected Map |
getProperties()
|
void |
initialise()
Method used to perform any initialisation work. |
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. |
void |
setObjectClass(Class objectClass)
|
void |
setObjectClassName(String objectClassName)
|
void |
setProperties(Map properties)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ATTRIBUTE_OBJECT_CLASS_NAME
public static final String ATTRIBUTE_OBJECT_CLASS
protected String objectClassName
protected Class objectClass
protected Map properties
protected List initialisationCallbacks
protected transient Log logger
Constructor Detail |
---|
public AbstractObjectFactory()
public AbstractObjectFactory(String objectClassName)
public AbstractObjectFactory(String objectClassName, Map properties)
public AbstractObjectFactory(Class objectClass)
public AbstractObjectFactory(Class objectClass, Map properties)
Method Detail |
---|
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 shutdown
RecoverableException
- if an error occurs that can be recovered frompublic void dispose()
Disposable
dispose
in interface Disposable
public Object getInstance() throws Exception
getInstance
in interface ObjectFactory
Exception
protected void fireInitialisationCallbacks(Object component) throws InitialisationException
InitialisationException
public Class getObjectClass()
ObjectFactory
getObjectClass
in interface ObjectFactory
public void setObjectClass(Class objectClass)
protected String getObjectClassName()
public void setObjectClassName(String objectClassName)
protected Map getProperties()
public void setProperties(Map properties)
public void addObjectInitialisationCallback(InitialisationCallback callback)
ObjectFactory
addObjectInitialisationCallback
in interface ObjectFactory
public boolean isSingleton()
ObjectFactory
isSingleton
in interface ObjectFactory
public boolean isExternallyManagedLifecycle()
ObjectFactory
isExternallyManagedLifecycle
in interface ObjectFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |