public class TransientRegistry extends AbstractRegistry
| Modifier and Type | Field and Description |
|---|---|
static String |
REGISTRY_ID |
lifecycleManager, logger, muleContextPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
TransientRegistry(MuleContext muleContext) |
TransientRegistry(String id,
MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
applyProcessors(Map<String,Object> objects) |
protected void |
checkDisposed() |
protected void |
doDispose() |
protected void |
doInitialise() |
protected boolean |
hasFlag(Object metaData,
int flag) |
boolean |
isReadOnly() |
boolean |
isRemote() |
<T> Map<String,T> |
lookupByType(Class<T> type) |
<T> Collection<T> |
lookupLocalObjects(Class<T> type)
Look up all objects of a given type within the local registry.
|
<T> T |
lookupObject(String key)
Look up a single object by name.
|
<T> Collection<T> |
lookupObjects(Class<T> returntype)
Look up all objects of a given type.
|
void |
registerObject(String key,
Object value)
Allows for arbitary registration of transient objects
|
void |
registerObject(String key,
Object object,
Object metadata)
Allows for arbitrary registration of transient objects
|
void |
registerObjects(Map<String,Object> objects)
Registers a Map of objects into the registry
|
void |
unregisterObject(String key)
Will remove an object by name from the registry.
|
void |
unregisterObject(String key,
Object metadata)
Will remove an object by name from the registry.
|
createLifecycleManager, dispose, fireLifecycle, get, getLifecycleManager, getRegistryId, initialise, lookupObject, lookupObjectsForLifecyclepublic static final String REGISTRY_ID
public TransientRegistry(MuleContext muleContext)
public TransientRegistry(String id, MuleContext muleContext)
protected void doInitialise()
throws InitialisationException
doInitialise in class AbstractRegistryInitialisationExceptionprotected void doDispose()
doDispose in class AbstractRegistrypublic void registerObjects(Map<String,Object> objects) throws RegistrationException
Registryobjects - a map of key value pairs, each will individually be registered in the registryRegistrationException - if an object with the same key already existspublic <T> T lookupObject(String key)
Registrypublic <T> Collection<T> lookupObjects(Class<T> returntype)
Registrypublic <T> Collection<T> lookupLocalObjects(Class<T> type)
Registrypublic void registerObject(String key, Object value) throws RegistrationException
key - value - RegistrationException - if an object with the same key already existspublic void registerObject(String key, Object object, Object metadata) throws RegistrationException
key - the key to store the value against. This is a non-null valueobject - the object to store in the registry. This is a non-null valuemetadata - an implementation specific argument that can be passed into the methodRegistrationException - if an object with the same key already existsprotected void checkDisposed()
throws RegistrationException
RegistrationExceptionprotected boolean hasFlag(Object metaData, int flag)
public void unregisterObject(String key, Object metadata) throws RegistrationException
key - the name or key of the object to remove from the registrymetadata - Meta data flags supported are MuleRegistry.LIFECYCLE_BYPASS_FLAGRegistrationException - if there is a problem unregistering the object. Typically this will be because
the object's lifecycle threw an exceptionpublic void unregisterObject(String key) throws RegistrationException
Registrykey - the name or key of the object to remove from the registryRegistrationException - if there is a problem unregistering the object. Typically this will be because
the object's lifecycle threw an exceptionpublic boolean isReadOnly()
public boolean isRemote()
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.