org.mule.registry
Class AbstractRegistry
java.lang.Object
org.mule.registry.AbstractRegistry
- All Implemented Interfaces:
- Disposable, Initialisable, Registry
- Direct Known Subclasses:
- GuiceRegistry, SpringRegistry, TransientRegistry
public abstract class AbstractRegistry
- extends java.lang.Object
- implements Registry
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected transient Log logger
muleContext
protected MuleContext muleContext
lifecycleManager
protected RegistryLifecycleManager lifecycleManager
AbstractRegistry
protected AbstractRegistry(java.lang.String id,
MuleContext muleContext)
dispose
public final void dispose()
- Description copied from interface:
Disposable
- A lifecycle method where implementor should free up any resources. If an
exception is thrown it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose
in interface Disposable
createLifecycleManager
protected RegistryLifecycleManager createLifecycleManager()
doInitialise
protected abstract void doInitialise()
throws InitialisationException
- Throws:
InitialisationException
doDispose
protected abstract void doDispose()
initialise
public final void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
InitialisationException
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.
- Specified by:
initialise
in interface Initialisable
- Throws:
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered from
getLifecycleManager
public RegistryLifecycleManager getLifecycleManager()
fireLifecycle
public void fireLifecycle(java.lang.String phase)
throws LifecycleException
- Specified by:
fireLifecycle
in interface Registry
- Throws:
LifecycleException
get
public <T> T get(java.lang.String key)
- Description copied from interface:
Registry
- Alias method performing the lookup, here to simplify syntax when called from dynamic languages.
- Specified by:
get
in interface Registry
lookupObject
public <T> T lookupObject(java.lang.Class<T> type)
throws RegistrationException
- Description copied from interface:
Registry
- Look up a single object by type.
- Specified by:
lookupObject
in interface Registry
- Returns:
- object or null if not found
- Throws:
RegistrationException
- if more than one object is found.
getRegistryId
public final java.lang.String getRegistryId()
- Specified by:
getRegistryId
in interface Registry
Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.