|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.registry.AbstractRegistry
org.mule.config.spring.SpringRegistry
public class SpringRegistry
Field Summary | |
---|---|
protected org.springframework.context.ApplicationContext |
applicationContext
|
static java.lang.String |
REGISTRY_ID
|
static java.lang.String |
SPRING_APPLICATION_CONTEXT
Key used to lookup Spring Application Context from SpringRegistry via Mule's Registry interface. |
protected java.util.concurrent.atomic.AtomicBoolean |
springContextInitialised
|
Fields inherited from class org.mule.registry.AbstractRegistry |
---|
lifecycleManager, logger, 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 | |
---|---|
SpringRegistry(org.springframework.context.ApplicationContext applicationContext,
MuleContext muleContext)
|
|
SpringRegistry(org.springframework.context.ConfigurableApplicationContext applicationContext,
org.springframework.context.ApplicationContext parentContext,
MuleContext muleContext)
|
|
SpringRegistry(MuleContext muleContext)
|
|
SpringRegistry(java.lang.String id,
org.springframework.context.ApplicationContext applicationContext,
MuleContext muleContext)
|
|
SpringRegistry(java.lang.String id,
org.springframework.context.ConfigurableApplicationContext applicationContext,
org.springframework.context.ApplicationContext parentContext,
MuleContext muleContext)
|
|
SpringRegistry(java.lang.String id,
MuleContext muleContext)
|
Method Summary | ||
---|---|---|
protected RegistryLifecycleManager |
createLifecycleManager()
|
|
void |
doDispose()
|
|
protected void |
doInitialise()
|
|
boolean |
isReadOnly()
|
|
boolean |
isRemote()
|
|
|
lookupByType(java.lang.Class<T> type)
|
|
java.lang.Object |
lookupObject(java.lang.String key)
Look up a single object by name. |
|
|
lookupObjects(java.lang.Class<T> type)
Look up all objects of a given type. |
|
void |
registerObject(java.lang.String key,
java.lang.Object value)
Registers an object in the registry with a key. |
|
void |
registerObject(java.lang.String key,
java.lang.Object value,
java.lang.Object metadata)
Registers an object in the registry with a key. |
|
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 |
---|
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 |
---|
public static final java.lang.String REGISTRY_ID
public static final java.lang.String SPRING_APPLICATION_CONTEXT
protected org.springframework.context.ApplicationContext applicationContext
protected java.util.concurrent.atomic.AtomicBoolean springContextInitialised
Constructor Detail |
---|
public SpringRegistry(MuleContext muleContext)
public SpringRegistry(java.lang.String id, MuleContext muleContext)
public SpringRegistry(org.springframework.context.ApplicationContext applicationContext, MuleContext muleContext)
public SpringRegistry(java.lang.String id, org.springframework.context.ApplicationContext applicationContext, MuleContext muleContext)
public SpringRegistry(org.springframework.context.ConfigurableApplicationContext applicationContext, org.springframework.context.ApplicationContext parentContext, MuleContext muleContext)
public SpringRegistry(java.lang.String id, org.springframework.context.ConfigurableApplicationContext applicationContext, org.springframework.context.ApplicationContext parentContext, MuleContext muleContext)
Method Detail |
---|
protected void doInitialise() throws InitialisationException
doInitialise
in class AbstractRegistry
InitialisationException
public void doDispose()
doDispose
in class AbstractRegistry
protected RegistryLifecycleManager createLifecycleManager()
createLifecycleManager
in class AbstractRegistry
public java.lang.Object lookupObject(java.lang.String key)
Registry
public <T> java.util.Collection<T> lookupObjects(java.lang.Class<T> type)
Registry
public <T> java.util.Map<java.lang.String,T> lookupByType(java.lang.Class<T> type)
public void registerObject(java.lang.String key, java.lang.Object value) throws RegistrationException
Registry
key
- the key to store the value against. This is a non-null valuevalue
- the object to store in the registry. This is a non-null value
RegistrationException
- if an object with the same key already existspublic void registerObject(java.lang.String key, java.lang.Object value, java.lang.Object metadata) throws RegistrationException
Registry
key
- the key to store the value against. This is a non-null valuevalue
- 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 existspublic 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 void unregisterObject(java.lang.String key)
Registry
key
- the name or key of the object to remove from the registrypublic void unregisterObject(java.lang.String key, java.lang.Object metadata) throws RegistrationException
Registry
key
- the name or key of the object to remove from the registrymetadata
- an implementation specific argument that can be passed into the method
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 |