org.mule.registry.impl
Class AbstractRegistry

java.lang.Object
  extended byorg.mule.registry.impl.AbstractRegistry
All Implemented Interfaces:
Registry

public abstract class AbstractRegistry
extends Object
implements Registry


Field Summary
protected  ManagementContext context
           
static String REGISTRY_DIRECTORY
           
protected  RegistryStore store
           
 
Constructor Summary
AbstractRegistry(RegistryStore store, ManagementContext context)
           
 
Method Summary
 Assembly addAssembly(String name)
           
 RegistryComponent addComponent(String name, ComponentType type)
           
 Library addLibrary(String name)
           
 RegistryComponent addTransientComponent(String name, ComponentType type, Object component, Object bootstrap)
           
 void addTransientUnit(String suName, RegistryComponent component, String installDir)
           
protected abstract  void bootstrapComponent(RegistryComponent component, Object bootstrap)
           
 Assembly[] getAssemblies()
           
 Assembly getAssembly(String name)
           
 RegistryComponent getComponent(String name)
           
 RegistryComponent getComponent(String name, ComponentType type)
           
 RegistryComponent[] getComponents()
           
 RegistryComponent[] getComponents(ComponentType type)
          Return all engines.
 Library[] getLibraries()
           
 Library getLibrary(String name)
           
 ManagementContext getManagementContext()
           
 String getStoreLocation()
           
 File getWorkingDirectory()
           
 void initialize()
           
 boolean isStarted()
           
 void removeAssembly(Assembly assembly)
           
 void removeComponent(RegistryComponent component)
          Remove a registered component from the list.
 void removeLibrary(Library library)
           
 void save()
           
 void setStoreLocation(String storeLocation)
           
 void setWorkingDirectory(File workingDirectory)
           
 void shutDown()
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.registry.Registry
createAssembly, createComponent, createLibrary, createUnit
 

Field Detail

REGISTRY_DIRECTORY

public static final String REGISTRY_DIRECTORY
See Also:
Constant Field Values

store

protected transient RegistryStore store

context

protected transient ManagementContext context
Constructor Detail

AbstractRegistry

public AbstractRegistry(RegistryStore store,
                        ManagementContext context)
Method Detail

getWorkingDirectory

public File getWorkingDirectory()

setWorkingDirectory

public void setWorkingDirectory(File workingDirectory)

getStoreLocation

public String getStoreLocation()
Specified by:
getStoreLocation in interface Registry

setStoreLocation

public void setStoreLocation(String storeLocation)

getComponents

public RegistryComponent[] getComponents()
Specified by:
getComponents in interface Registry

getComponents

public RegistryComponent[] getComponents(ComponentType type)
Description copied from interface: Registry
Return all engines.

Specified by:
getComponents in interface Registry
Returns:

getComponent

public RegistryComponent getComponent(String name,
                                      ComponentType type)

removeComponent

public void removeComponent(RegistryComponent component)
Description copied from interface: Registry
Remove a registered component from the list. Internal use only.

Specified by:
removeComponent in interface Registry
Parameters:
component - the component to remove

getComponent

public RegistryComponent getComponent(String name)
Specified by:
getComponent in interface Registry

addComponent

public RegistryComponent addComponent(String name,
                                      ComponentType type)
                               throws RegistryException
Specified by:
addComponent in interface Registry
Throws:
RegistryException

addTransientComponent

public RegistryComponent addTransientComponent(String name,
                                               ComponentType type,
                                               Object component,
                                               Object bootstrap)
                                        throws RegistryException
Specified by:
addTransientComponent in interface Registry
Throws:
RegistryException

bootstrapComponent

protected abstract void bootstrapComponent(RegistryComponent component,
                                           Object bootstrap)
                                    throws Exception
Throws:
Exception

getLibraries

public Library[] getLibraries()
Specified by:
getLibraries in interface Registry

getLibrary

public Library getLibrary(String name)
Specified by:
getLibrary in interface Registry

addLibrary

public Library addLibrary(String name)
                   throws RegistryException
Specified by:
addLibrary in interface Registry
Throws:
RegistryException

removeLibrary

public void removeLibrary(Library library)
Specified by:
removeLibrary in interface Registry

getAssemblies

public Assembly[] getAssemblies()
Specified by:
getAssemblies in interface Registry

getAssembly

public Assembly getAssembly(String name)
Specified by:
getAssembly in interface Registry

addAssembly

public Assembly addAssembly(String name)
Specified by:
addAssembly in interface Registry

removeAssembly

public void removeAssembly(Assembly assembly)
Specified by:
removeAssembly in interface Registry

initialize

public void initialize()

start

public void start()
           throws RegistryException
Specified by:
start in interface Registry
Throws:
RegistryException

shutDown

public void shutDown()
              throws RegistryException
Specified by:
shutDown in interface Registry
Throws:
RegistryException

addTransientUnit

public void addTransientUnit(String suName,
                             RegistryComponent component,
                             String installDir)
                      throws RegistryException
Specified by:
addTransientUnit in interface Registry
Throws:
RegistryException

save

public void save()
          throws RegistryException
Specified by:
save in interface Registry
Throws:
RegistryException

isStarted

public boolean isStarted()

getManagementContext

public ManagementContext getManagementContext()
Specified by:
getManagementContext in interface Registry


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