|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.core.container.CoreServiceManager
Default service manager for Cocoon's components.
| Field Summary | |
protected ClassLoader |
classloader
The classloader to get classes from |
protected ComponentEnvironment |
componentEnv
|
protected Map |
componentHandlers
Used to map roles to ComponentHandlers. |
protected Map |
componentMapping
Static component mapping handlers. |
protected Context |
context
The application context for components |
protected static Map |
CONTEXT_PARAMETERS
Parameter map for the context protocol |
protected boolean |
disposed
Is the Manager disposed or not? |
static Configuration |
EMPTY_CONFIGURATION
An empty configuration object, that can be used when no configuration is known but one is needed. |
protected boolean |
initialized
Is the Manager initialized? |
protected String |
location
The location where this manager is defined |
protected LoggerManager |
loggerManager
LoggerManager. |
protected ServiceManager |
parentManager
The parent ServiceManager |
protected RoleManager |
roleManager
RoleInfos. |
| Constructor Summary | |
CoreServiceManager(ServiceManager parent)
Create the ServiceManager with a parent ServiceManager |
|
CoreServiceManager(ServiceManager parent,
ClassLoader classloader)
Create the ServiceManager with a parent ServiceManager and a ClassLoader |
|
| Method Summary | |
void |
addComponent(String role,
String className,
Configuration configuration,
ComponentInfo info)
Add a new component to the manager. |
void |
addInstance(String role,
Object instance)
Add an existing object to the manager. |
void |
addRoleAlias(String existingRole,
String newRole)
Add an alias to a role, i.e. define a synonym for the role. |
void |
configure(Configuration configuration)
|
void |
contextualize(Context context)
|
void |
dispose()
|
void |
enableLogging(Logger logger)
|
boolean |
hasService(String role)
|
void |
initialize()
|
protected void |
initialize(String role,
Object component)
Initialize the component |
Object |
lookup(String role)
|
void |
release(Object component)
|
void |
setLoggerManager(LoggerManager manager)
Configure the LoggerManager. |
void |
setRoleManager(RoleManager rm)
|
| 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 |
| Field Detail |
public static final Configuration EMPTY_CONFIGURATION
protected static final Map CONTEXT_PARAMETERS
protected Context context
protected final Map componentMapping
protected final Map componentHandlers
protected boolean disposed
protected boolean initialized
protected RoleManager roleManager
protected LoggerManager loggerManager
protected ComponentEnvironment componentEnv
protected String location
protected ServiceManager parentManager
protected ClassLoader classloader
| Constructor Detail |
public CoreServiceManager(ServiceManager parent)
public CoreServiceManager(ServiceManager parent,
ClassLoader classloader)
| Method Detail |
public void enableLogging(Logger logger)
enableLogging in interface LogEnabled
public void contextualize(Context context)
throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void setLoggerManager(LoggerManager manager)
public void setRoleManager(RoleManager rm)
public void configure(Configuration configuration)
throws ConfigurationException
configure in interface ConfigurableConfigurationException
public void initialize()
throws Exception
initialize in interface InitializableExceptionpublic void dispose()
dispose in interface Disposablepublic boolean hasService(String role)
hasService in interface ServiceManager
public Object lookup(String role)
throws ServiceException
lookup in interface ServiceManagerServiceExceptionpublic void release(Object component)
release in interface ServiceManager
public void addComponent(String role,
String className,
Configuration configuration,
ComponentInfo info)
throws ConfigurationException
role - the role name for the new component.className - the class of this component.configuration - the configuration for this component.
ConfigurationException
public void addInstance(String role,
Object instance)
throws ServiceException
Disposable
method is considered.
role - the role under which the object will be knowninstance - the component instance
ServiceException
public void addRoleAlias(String existingRole,
String newRole)
throws ServiceException
existingRole - the existing role that will be aliasednewRole - the new role
ServiceException - if the existing role could not be found in the current
manager and its ancestors
protected void initialize(String role,
Object component)
throws ServiceException
ServiceException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||