|
|||||||||||
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.DefaultServiceSelector
Default component selector for Cocoon's components. This selector "flattens" its declaration by adding them as components of its containing ServiceManager. This allows a smooth transition towards a fully flat configuration by allowing the use of selectors in legacy components and also declaration of hinted components (i.e. with a role of type "rolename/hint") in the service manager.
Nested Class Summary | |
static class |
DefaultServiceSelector.Factory
A special factory for DefaultServiceSelector , that passes it the
RoleManager and its role name. |
Field Summary | |
static String |
DEFAULT_HINT
Synthetic hint to alias the default component |
Constructor Summary | |
DefaultServiceSelector()
|
Method Summary | |
void |
configure(Configuration config)
|
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. |
boolean |
isSelectable(Object hint)
|
void |
release(Object obj)
|
Object |
select(Object hint)
|
void |
service(ServiceManager manager)
|
void |
setRole(String role)
|
void |
setRoleManager(RoleManager roles)
|
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 |
public static final String DEFAULT_HINT
Constructor Detail |
public DefaultServiceSelector()
Method Detail |
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void setRole(String role)
public void setRoleManager(RoleManager roles)
public void configure(Configuration config) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
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 obj)
release
in interface ServiceSelector
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 subclasses
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |