public class TransientRegistry extends AbstractRegistry
Modifier and Type | Field and Description |
---|---|
static String |
REGISTRY_ID |
lifecycleManager, logger, muleContext
PHASE_NAME
PHASE_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, lookupObjectsForLifecycle
public static final String REGISTRY_ID
public TransientRegistry(MuleContext muleContext)
public TransientRegistry(String id, MuleContext muleContext)
protected void doInitialise() throws InitialisationException
doInitialise
in class AbstractRegistry
InitialisationException
protected void doDispose()
doDispose
in class AbstractRegistry
public void registerObjects(Map<String,Object> objects) throws RegistrationException
Registry
objects
- 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)
Registry
public <T> Collection<T> lookupObjects(Class<T> returntype)
Registry
public <T> Collection<T> lookupLocalObjects(Class<T> type)
Registry
public 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
RegistrationException
protected 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_FLAG
RegistrationException
- 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
Registry
key
- 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.