org.apache.cocoon.components.container
Class CocoonServiceManager

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.core.container.CoreServiceManager
          extended byorg.apache.cocoon.components.container.CocoonServiceManager
All Implemented Interfaces:
Configurable, Contextualizable, Disposable, Initializable, LogEnabled, ServiceManager, ThreadSafe

public class CocoonServiceManager
extends CoreServiceManager

Default service manager for Cocoon's components.

Version:
CVS $Revision: 1.6 $Id: CocoonServiceManager.java 292282 2005-09-28 19:54:16Z vgritsenko $

Field Summary
 
Fields inherited from class org.apache.cocoon.core.container.CoreServiceManager
classloader, componentEnv, componentHandlers, componentMapping, context, CONTEXT_PARAMETERS, disposed, EMPTY_CONFIGURATION, initialized, location, loggerManager, parentManager, roleManager
 
Constructor Summary
CocoonServiceManager(ServiceManager parent)
          Create the ServiceManager with a parent ServiceManager
CocoonServiceManager(ServiceManager parent, ClassLoader classloader)
          Create the ServiceManager with a parent ServiceManager and a ClassLoader
 
Method Summary
 void addComponent(String role, String clazz, Configuration config, ComponentInfo i)
          Add a new component to the manager.
 void addRoleAlias(String existingRole, String newRole)
          Add an alias to a role, i.e. define a synonym for the role.
 void initialize()
           
protected  void initialize(String role, Object component)
          Initialize the component
 
Methods inherited from class org.apache.cocoon.core.container.CoreServiceManager
addInstance, configure, contextualize, dispose, enableLogging, hasService, lookup, release, setLoggerManager, setRoleManager
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CocoonServiceManager

public CocoonServiceManager(ServiceManager parent)
Create the ServiceManager with a parent ServiceManager


CocoonServiceManager

public CocoonServiceManager(ServiceManager parent,
                            ClassLoader classloader)
Create the ServiceManager with a parent ServiceManager and a ClassLoader

Method Detail

addComponent

public void addComponent(String role,
                         String clazz,
                         Configuration config,
                         ComponentInfo i)
                  throws ConfigurationException
Description copied from class: CoreServiceManager
Add a new component to the manager.

Overrides:
addComponent in class CoreServiceManager
Parameters:
role - the role name for the new component.
clazz - the class of this component.
config - the configuration for this component.
Throws:
ConfigurationException

addRoleAlias

public void addRoleAlias(String existingRole,
                         String newRole)
                  throws ServiceException
Description copied from class: CoreServiceManager
Add an alias to a role, i.e. define a synonym for the role.

Overrides:
addRoleAlias in class CoreServiceManager
Parameters:
existingRole - the existing role that will be aliased
newRole - the new role
Throws:
ServiceException - if the existing role could not be found in the current manager and its ancestors

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Overrides:
initialize in class CoreServiceManager
Throws:
Exception

initialize

protected void initialize(String role,
                          Object component)
                   throws ServiceException
Description copied from class: CoreServiceManager
Initialize the component

Overrides:
initialize in class CoreServiceManager
Throws:
ServiceException


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.