|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.registry.AbstractRegistry
org.mule.registry.TransientRegistry
public class TransientRegistry
Use synchronized(registry) when reading/writing/iterating over the contents of the registry hashmap.
| Field Summary | |
|---|---|
protected Log |
logger
logger used by this class |
static String |
REGISTRY_ID
|
| Fields inherited from class org.mule.registry.AbstractRegistry |
|---|
lifecycleManager, muleContext |
| Fields inherited from interface org.mule.api.lifecycle.Initialisable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Disposable |
|---|
PHASE_NAME |
| Constructor Summary | |
|---|---|
TransientRegistry(MuleContext muleContext)
|
|
TransientRegistry(String id,
MuleContext muleContext)
|
|
| Method Summary | ||
|---|---|---|
protected Map |
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()
|
|
|
lookupByType(Class<T> type)
|
|
|
lookupObject(String key)
Look up a single object by name. |
|
|
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 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. |
|
| Methods inherited from class org.mule.registry.AbstractRegistry |
|---|
createLifecycleManager, dispose, fireLifecycle, get, getLifecycleManager, getRegistryId, initialise, lookupObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final transient Log logger
public static final String REGISTRY_ID
| Constructor Detail |
|---|
public TransientRegistry(MuleContext muleContext)
public TransientRegistry(String id,
MuleContext muleContext)
| Method Detail |
|---|
protected void doInitialise()
throws InitialisationException
doInitialise in class AbstractRegistryInitialisationExceptionprotected void doDispose()
doDispose in class AbstractRegistryprotected Map applyProcessors(Map<String,Object> objects)
public void registerObjects(Map objects)
throws RegistrationException
Registry
objects - a map of key value pairs, each will individually be registered in the registry
RegistrationException - if an object with the same key already existspublic <T> Map<String,T> lookupByType(Class<T> type)
public <T> T lookupObject(String key)
Registry
public <T> Collection<T> lookupObjects(Class<T> returntype)
Registry
public void registerObject(String key,
Object value)
throws RegistrationException
key - value -
RegistrationException - if an object with the same key already exists
public void registerObject(String key,
Object object,
Object metadata)
throws RegistrationException
key - object - the object to store in the registry. This is a non-null valuemetadata - an implementation specific argument that can be passed into the method
RegistrationException - if an object with the same key already exists
protected 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 org.mule.api.registry.MuleRegistry.LIFECYCLE_BYPASS_FLAG
RegistrationException - if there is a problem unregistering the object. Typically this will be because
the object's lifecycle threw an exception
public void unregisterObject(String key)
throws RegistrationException
Registry
key - the name or key of the object to remove from the registry
RegistrationException - 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||