|
|||||||||||
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.AbstractServiceManager
org.apache.cocoon.core.container.StandaloneServiceSelector
Default component selector for Cocoon's components.
Nested Class Summary | |
static class |
StandaloneServiceSelector.Factory
A special factory that sets the RoleManager and LoggerManager after service() |
Field Summary | |
protected String |
defaultKey
The default key |
protected ServiceManager |
parentLocator
The parent locator, if any |
protected StandaloneServiceSelector |
parentSelector
The parent selector, if any |
protected String |
roleName
The role of this selector. |
protected ServiceManager |
serviceManager
The application context for components |
Fields inherited from class org.apache.cocoon.core.container.AbstractServiceManager |
componentEnv, componentHandlers, componentMapping, context, disposed, initialized, loggerManager, roleManager |
Constructor Summary | |
StandaloneServiceSelector()
|
Method Summary | |
void |
addComponent(String key,
Class component,
Configuration configuration,
ComponentInfo info)
Add a new component to the manager. |
protected boolean |
canRelease(Object component)
|
void |
configure(Configuration config)
|
void |
dispose()
|
protected String |
getClassAttributeName()
Get the name of the attribute giving the class name of a component. |
protected String |
getComponentInstanceName()
Get the name for component-instance elements (i.e. components not defined by their role shortcut. |
protected String |
getDefaultKeyAttributeName()
Get the name of the attribute giving the default key to use if none is given. |
protected String |
getRoleName(Configuration config)
Get the role name for this selector. |
void |
initialize()
|
boolean |
isSelectable(Object hint)
|
void |
release(Object component)
|
Object |
select(Object hint)
|
void |
service(ServiceManager componentManager)
|
Methods inherited from class org.apache.cocoon.core.container.AbstractServiceManager |
addComponent, contextualize, getComponentHandler, setLoggerManager, setRoleManager |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ServiceManager serviceManager
protected StandaloneServiceSelector parentSelector
protected ServiceManager parentLocator
protected String roleName
configure()
.
protected String defaultKey
Constructor Detail |
public StandaloneServiceSelector()
Method Detail |
public Object select(Object hint) throws ServiceException
select
in interface ServiceSelector
ServiceException
public boolean isSelectable(Object hint)
isSelectable
in interface ServiceSelector
public void release(Object component)
release
in interface ServiceSelector
public void service(ServiceManager componentManager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration config) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void initialize() throws Exception
initialize
in interface Initializable
initialize
in class AbstractServiceManager
Exception
public void dispose()
dispose
in interface Disposable
dispose
in class AbstractServiceManager
public void addComponent(String key, Class component, Configuration configuration, ComponentInfo info) throws ServiceException
addComponent
in class AbstractServiceManager
key
- the key for the new component.component
- the class of this component.configuration
- the configuration for this component.
ServiceException
protected String getComponentInstanceName()
null
, any element having a 'class'
attribute will be considered as a component instance.
The default here is to return null
, and subclasses can redefine
this method to return particular values.
null
, but can be changed by subclassesprotected String getClassAttributeName()
class
", but can be changed by subclassesprotected String getDefaultKeyAttributeName()
null
,
no default key can be specified.
default
", but can be changed by subclassesprotected String getRoleName(Configuration config)
configure()
to set the value of this.roleName
.
null if it couldn't be determined.
protected boolean canRelease(Object component)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |