Class AbstractRegistry

  extended by org.mule.registry.AbstractRegistry
All Implemented Interfaces:
Disposable, Initialisable, Registry
Direct Known Subclasses:
SpringRegistry, TransientRegistry

public abstract class AbstractRegistry
extends Object
implements Registry

Field Summary
protected  Log logger
Fields inherited from interface org.mule.api.lifecycle.Initialisable
Fields inherited from interface org.mule.api.lifecycle.Disposable
Constructor Summary
protected AbstractRegistry(String id)
          Default Constructor
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
protected abstract  void doDispose()
protected abstract  void doInitialise()
 String getRegistryId()
 void initialise()
          Method used to perform any initialisation work.
 Object lookupObject(Class type)
          Look up a single object by type.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mule.api.registry.Registry
isReadOnly, isRemote, lookupObject, lookupObjects, registerObject, registerObject, registerObjects, unregisterObject, unregisterObject

Field Detail


protected transient Log logger
Constructor Detail


protected AbstractRegistry(String id)
Default Constructor

Method Detail


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


protected abstract void doInitialise()
                              throws InitialisationException


protected abstract void doDispose()


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
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from


public Object lookupObject(Class type)
                    throws RegistrationException
Description copied from interface: Registry
Look up a single object by type.

Specified by:
lookupObject in interface Registry
object or null if not found
RegistrationException - if more than one object is found.


public final String getRegistryId()
Specified by:
getRegistryId in interface Registry

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.