public abstract class AbstractRegistry extends Object implements Registry
| Modifier and Type | Field and Description |
|---|---|
protected RegistryLifecycleManager |
lifecycleManager |
protected org.apache.commons.logging.Log |
logger |
protected MuleContext |
muleContext |
PHASE_NAMEPHASE_NAME| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRegistry(String id,
MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected RegistryLifecycleManager |
createLifecycleManager() |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
protected abstract void |
doDispose() |
protected abstract void |
doInitialise() |
void |
fireLifecycle(String phase) |
<T> T |
get(String key)
Alias method performing the lookup, here to simplify syntax when called from dynamic languages.
|
RegistryLifecycleManager |
getLifecycleManager() |
String |
getRegistryId() |
void |
initialise()
Method used to perform any initialisation work.
|
<T> T |
lookupObject(Class<T> type)
Look up a single object by type.
|
<T> Collection<T> |
lookupObjectsForLifecycle(Class<T> type)
Look up all objects of a given type that lifecycle should be applied to.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisReadOnly, isRemote, lookupByType, lookupLocalObjects, lookupObject, lookupObjects, registerObject, registerObject, registerObjects, unregisterObject, unregisterObjectprotected transient org.apache.commons.logging.Log logger
protected MuleContext muleContext
protected RegistryLifecycleManager lifecycleManager
protected AbstractRegistry(String id, MuleContext muleContext)
public final void dispose()
Disposabledispose in interface Disposableprotected RegistryLifecycleManager createLifecycleManager()
protected abstract void doInitialise()
throws InitialisationException
InitialisationExceptionprotected abstract void doDispose()
public final void initialise()
throws InitialisationException
InitialisableInitialisationException should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise in interface InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered frompublic RegistryLifecycleManager getLifecycleManager()
public void fireLifecycle(String phase) throws LifecycleException
fireLifecycle in interface RegistryLifecycleExceptionpublic <T> T get(String key)
Registrypublic <T> T lookupObject(Class<T> type) throws RegistrationException
RegistrylookupObject in interface RegistryRegistrationException - if more than one object is found.public <T> Collection<T> lookupObjectsForLifecycle(Class<T> type)
RegistryRegistry.lookupObjects(Class) in that it allows
implementations to provide an alternative implementation of lookup for
lifecycle. For example only returning pre-existing objects and not creating
new ones on the fly.lookupObjectsForLifecycle in interface Registrypublic final String getRegistryId()
getRegistryId in interface RegistryCopyright © 2003–2015 MuleSoft, Inc.. All rights reserved.