public class SingletonObjectFactory extends AbstractObjectFactory
ATTRIBUTE_OBJECT_CLASS, ATTRIBUTE_OBJECT_CLASS_NAME, disposed, flowConstruct, initialisationCallbacks, logger, objectClass, objectClassName, propertiesPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
SingletonObjectFactory()
For Spring only
|
SingletonObjectFactory(Class objectClass) |
SingletonObjectFactory(Class<?> objectClass,
Map properties) |
SingletonObjectFactory(Object instance)
Create the singleton based on a previously created object.
|
SingletonObjectFactory(String objectClassName) |
SingletonObjectFactory(String objectClassName,
Map properties) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
Object |
getInstance(MuleContext muleContext)
Always returns the same instance of the object.
|
Class<?> |
getObjectClass()
Returns the class of the object to be instantiated without actually creating
an instance.
|
boolean |
isSingleton()
Returns true if the ObjectFactory implementation always returns the same object
instance.
|
addObjectInitialisationCallback, fireInitialisationCallbacks, getObjectClassName, getProperties, initialise, isAutoWireObject, isExternallyManagedLifecycle, setFlowConstruct, setObjectClass, setObjectClassName, setProperties, setupObjectClassFromObjectClassNamepublic SingletonObjectFactory()
public SingletonObjectFactory(String objectClassName)
public SingletonObjectFactory(Class objectClass)
public SingletonObjectFactory(Object instance)
public void dispose()
Disposabledispose in interface Disposabledispose in class AbstractObjectFactorypublic Object getInstance(MuleContext muleContext) throws Exception
getInstance in interface ObjectFactorygetInstance in class AbstractObjectFactorymuleContext - Exception - Can throw any type of exception while creating a new objectpublic Class<?> getObjectClass()
ObjectFactorygetObjectClass in interface ObjectFactorygetObjectClass in class AbstractObjectFactorypublic boolean isSingleton()
ObjectFactoryisSingleton in interface ObjectFactoryisSingleton in class AbstractObjectFactoryCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.