|
||||||||||
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 java.lang.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(java.lang.String id,
MuleContext muleContext)
|
Method Summary | ||
---|---|---|
protected java.util.Map |
applyProcessors(java.util.Map<java.lang.String,java.lang.Object> objects)
|
|
protected void |
checkDisposed()
|
|
protected void |
doDispose()
|
|
protected void |
doInitialise()
|
|
protected boolean |
hasFlag(java.lang.Object metaData,
int flag)
|
|
boolean |
isReadOnly()
|
|
boolean |
isRemote()
|
|
|
lookupByType(java.lang.Class<T> type)
|
|
|
lookupObject(java.lang.String key)
Look up a single object by name. |
|
|
lookupObjects(java.lang.Class<T> returntype)
Look up all objects of a given type. |
|
void |
registerObject(java.lang.String key,
java.lang.Object value)
Allows for arbitary registration of transient objects |
|
void |
registerObject(java.lang.String key,
java.lang.Object object,
java.lang.Object metadata)
Allows for arbitrary registration of transient objects |
|
void |
registerObjects(java.util.Map objects)
Registers a Map of objects into the registry |
|
void |
unregisterObject(java.lang.String key)
Will remove an object by name from the registry. |
|
void |
unregisterObject(java.lang.String key,
java.lang.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 java.lang.String REGISTRY_ID
Constructor Detail |
---|
public TransientRegistry(MuleContext muleContext)
public TransientRegistry(java.lang.String id, MuleContext muleContext)
Method Detail |
---|
protected void doInitialise() throws InitialisationException
doInitialise
in class AbstractRegistry
InitialisationException
protected void doDispose()
doDispose
in class AbstractRegistry
protected java.util.Map applyProcessors(java.util.Map<java.lang.String,java.lang.Object> objects)
public void registerObjects(java.util.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> java.util.Map<java.lang.String,T> lookupByType(java.lang.Class<T> type)
public <T> T lookupObject(java.lang.String key)
Registry
public <T> java.util.Collection<T> lookupObjects(java.lang.Class<T> returntype)
Registry
public void registerObject(java.lang.String key, java.lang.Object value) throws RegistrationException
key
- value
-
RegistrationException
- if an object with the same key already existspublic void registerObject(java.lang.String key, java.lang.Object object, java.lang.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 existsprotected void checkDisposed() throws RegistrationException
RegistrationException
protected boolean hasFlag(java.lang.Object metaData, int flag)
public void unregisterObject(java.lang.String key, java.lang.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 exceptionpublic void unregisterObject(java.lang.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 |