public interface LifecycleRegistry extends Registry
Registry
which not only registers and fetches objects,
but it's also capable of applying lifecycle and injects dependenciesPHASE_NAME
PHASE_NAME
Modifier and Type | Method and Description |
---|---|
Object |
applyLifecycle(Object object)
Will fire any lifecycle methods according to the current lifecycle without actually
registering the object in the registry.
|
Object |
applyLifecycle(Object object,
String phase)
Will fire the given lifecycle
phase without actually
registering the object in the registry. |
<T> T |
lookupObject(String key,
boolean applyLifecycle)
Look up a single object by name.
|
fireLifecycle, get, getRegistryId, isReadOnly, isRemote, lookupByType, lookupLocalObjects, lookupObject, lookupObject, lookupObjects, lookupObjectsForLifecycle, registerObject, registerObject, registerObjects, unregisterObject, unregisterObject
initialise
dispose
Object applyLifecycle(Object object) throws MuleException
object
- the object to processMuleException
- if the registry fails to perform the lifecycle change for the object.Object applyLifecycle(Object object, String phase) throws MuleException
phase
without actually
registering the object in the registry. This is useful for prototype objects that are created per request and would
clutter the registry with single use objects.object
- the object to processphase
- the specific lifecycle phase you want to fireMuleException
- if the registry fails to perform the lifecycle change for the object.<T> T lookupObject(String key, boolean applyLifecycle)
Registry.lookupObject(String)
will
return objects which had lifecycle phases
applied,this method exists for cases in which
you want to specify that lifecycle is not to be
applied. The actual semantics of that actually depends
on the implementation, since invoking this method
might return a new instance or an already existing one.
If an existing one is returned, then the lifecycle might
have been previously applied regardless.key
- the key of the object you're looking forapplyLifecycle
- if lifecycle should be applied to the returned object.
Passing true
doesn't guarantee that the lifecycle is appliednull
if not foundCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.