org.mule.config.spring.factories
Class ScopedObjectFactory
java.lang.Object
org.mule.object.AbstractObjectFactory
org.mule.config.spring.factories.ScopedObjectFactory
- All Implemented Interfaces:
- MuleContextAware, Disposable, Initialisable, ObjectFactory
public class ScopedObjectFactory
- extends AbstractObjectFactory
This class is a bastardization of the the exising factories. It needs to be removed
| Methods inherited from class org.mule.object.AbstractObjectFactory |
addObjectInitialisationCallback, fireInitialisationCallbacks, getObjectClass, getObjectClassName, getProperties, isExternallyManagedLifecycle, setMuleContext, setObjectClass, setObjectClassName, setProperties, setupObjectClassFromObjectClassName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScopedObjectFactory
public ScopedObjectFactory()
getScope
public ObjectScope getScope()
setScope
public void setScope(ObjectScope scope)
getPoolingProfile
public PoolingProfile getPoolingProfile()
setPoolingProfile
public void setPoolingProfile(PoolingProfile poolingProfile)
initialise
public void initialise()
throws InitialisationException
- Method used to perform any initialisation work. If a fatal error occurs during
initialization, an
InitialisationException should be thrown,
causing the Mule instance to shut down. 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.
- Specified by:
initialise in interface Initialisable- Overrides:
initialise in class AbstractObjectFactory
- Throws:
org.mule.umo.lifecycle.InitialisationException - if a fatal error occurs causing the Mule
instance to shutdown
org.mule.umo.lifecycle.RecoverableException - if an error occurs that can be recovered from
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from
dispose
public void dispose()
- A lifecycle method where implementor should free up any resources. If an
exception is thrown, it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose in interface Disposable- Overrides:
dispose in class AbstractObjectFactory
isSingleton
public boolean isSingleton()
- Description copied from interface:
ObjectFactory
- Returns true if the ObjectFactory implementation always returns the same object
instance.
- Specified by:
isSingleton in interface ObjectFactory- Overrides:
isSingleton in class AbstractObjectFactory
getObjectInstance
public Object getObjectInstance()
setObjectInstance
public void setObjectInstance(Object instance)
getInstance
public Object getInstance()
throws Exception
- Description copied from class:
AbstractObjectFactory
- Creates an initialized object instance based on the class and sets any properties.
- Specified by:
getInstance in interface ObjectFactory- Overrides:
getInstance in class AbstractObjectFactory
- Throws:
Exception
isAutoWireObject
public boolean isAutoWireObject()
- Description copied from interface:
ObjectFactory
- Return true if the created object should get its dependencies wired from the registry automatically. Typically
Mule object factories would return true for this value, objects managed by DI container such as Spring should
set this to false.
- Returns:
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.