public class SpringRegistry extends AbstractRegistry
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.ApplicationContext |
applicationContext |
static String |
REGISTRY_ID |
static String |
SPRING_APPLICATION_CONTEXT
Key used to lookup Spring Application Context from SpringRegistry via Mule's
Registry interface.
|
protected AtomicBoolean |
springContextInitialised |
lifecycleManager, logger, muleContextPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
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(String id,
org.springframework.context.ApplicationContext applicationContext,
MuleContext muleContext) |
SpringRegistry(String id,
org.springframework.context.ConfigurableApplicationContext applicationContext,
org.springframework.context.ApplicationContext parentContext,
MuleContext muleContext) |
SpringRegistry(String id,
MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected RegistryLifecycleManager |
createLifecycleManager() |
void |
doDispose() |
protected void |
doInitialise() |
protected <T> Map<String,T> |
internalLookupByType(Class<T> type,
boolean nonSingletons,
boolean eagerInit) |
protected <T> Map<String,T> |
internalLookupByTypeWithoutAncestors(Class<T> type,
boolean nonSingletons,
boolean eagerInit) |
boolean |
isReadOnly() |
boolean |
isRemote() |
<T> Map<String,T> |
lookupByType(Class<T> type) |
<T> Collection<T> |
lookupLocalObjects(Class<T> type) |
Object |
lookupObject(String key) |
<T> Collection<T> |
lookupObjects(Class<T> type) |
<T> Collection<T> |
lookupObjectsForLifecycle(Class<T> type)
For lifecycle we only want spring to return singleton objects from it's application context
|
void |
registerObject(String key,
Object value) |
void |
registerObject(String key,
Object value,
Object metadata) |
void |
registerObjects(Map<String,Object> objects) |
void |
unregisterObject(String key) |
void |
unregisterObject(String key,
Object metadata) |
dispose, fireLifecycle, get, getLifecycleManager, getRegistryId, initialise, lookupObjectpublic static final String REGISTRY_ID
public static final String SPRING_APPLICATION_CONTEXT
protected org.springframework.context.ApplicationContext applicationContext
protected AtomicBoolean springContextInitialised
public SpringRegistry(MuleContext muleContext)
public SpringRegistry(String id, MuleContext muleContext)
public SpringRegistry(org.springframework.context.ApplicationContext applicationContext,
MuleContext muleContext)
public SpringRegistry(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(String id, org.springframework.context.ConfigurableApplicationContext applicationContext, org.springframework.context.ApplicationContext parentContext, MuleContext muleContext)
protected void doInitialise()
throws InitialisationException
doInitialise in class AbstractRegistryInitialisationExceptionpublic void doDispose()
doDispose in class AbstractRegistryprotected RegistryLifecycleManager createLifecycleManager()
createLifecycleManager in class AbstractRegistrypublic <T> Collection<T> lookupObjects(Class<T> type)
public <T> Collection<T> lookupLocalObjects(Class<T> type)
public <T> Collection<T> lookupObjectsForLifecycle(Class<T> type)
lookupObjectsForLifecycle in interface RegistrylookupObjectsForLifecycle in class AbstractRegistryprotected <T> Map<String,T> internalLookupByType(Class<T> type, boolean nonSingletons, boolean eagerInit)
protected <T> Map<String,T> internalLookupByTypeWithoutAncestors(Class<T> type, boolean nonSingletons, boolean eagerInit)
public void registerObject(String key, Object value) throws RegistrationException
RegistrationExceptionpublic void registerObject(String key, Object value, Object metadata) throws RegistrationException
RegistrationExceptionpublic void registerObjects(Map<String,Object> objects) throws RegistrationException
RegistrationExceptionpublic void unregisterObject(String key)
public void unregisterObject(String key, Object metadata) throws RegistrationException
RegistrationExceptionpublic boolean isReadOnly()
public boolean isRemote()
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.