public final class MetaInfoEntry
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FACTORY_HANDLER |
private java.lang.String |
m_configName |
private java.util.List |
m_dependencies |
private java.lang.Class |
m_handler |
private java.lang.Class |
m_klass |
private static java.util.Map |
m_lifecycleMap
Translate from lifestyle to component handler.
|
private boolean |
m_readOnly |
private java.util.Set |
m_roles |
static java.lang.String |
PER_THREAD_HANDLER |
static java.lang.String |
POOLABLE_HANDLER |
static java.lang.String |
THREADSAFE_HANDLER |
private static java.lang.String |
TYPE_POOLED |
private static java.lang.String |
TYPE_SINGLETON |
private static java.lang.String |
TYPE_THREAD |
private static java.lang.String |
TYPE_TRANSIENT |
| Constructor and Description |
|---|
MetaInfoEntry(java.lang.Class componentClass,
java.util.Properties properties,
java.util.List deps)
Create a MetaInfoEntry from the supplied component class, and the
supplied meta information.
|
MetaInfoEntry(RoleEntry roleEntry)
Create a MetaInfoEntry from the supplied
RoleEntry. |
| Modifier and Type | Method and Description |
|---|---|
void |
addRole(java.lang.String role)
Add a service/role for the component entry.
|
boolean |
containsRole(java.lang.String role)
Tests to see if a component exposes a role.
|
static java.lang.String |
createShortName(java.lang.String className)
Convert a Component implmentation classname into a shorthand
name.
|
java.lang.Class |
getComponentClass()
Get the
Class for the component type. |
java.lang.String |
getConfigurationName()
Get the configuration name for the component type.
|
java.util.List |
getDependencies()
Get a reference to the dependencies list.
|
private java.lang.String |
getHandler(java.util.Properties meta)
Get the name of the requested component handler.
|
java.lang.Class |
getHandlerClass()
Get the
Class for the component type's
org.apache.avalon.fortress.impl.handler.ComponentHandler. |
java.util.Iterator |
getRoles()
Get an iterator for all the roles.
|
void |
makeReadOnly()
Make the component entry read only, so no more services can be added.
|
public static final java.lang.String THREADSAFE_HANDLER
public static final java.lang.String POOLABLE_HANDLER
public static final java.lang.String FACTORY_HANDLER
public static final java.lang.String PER_THREAD_HANDLER
private final java.lang.Class m_klass
private final java.lang.String m_configName
private final java.lang.Class m_handler
private final java.util.Set m_roles
private volatile boolean m_readOnly
private static final java.util.Map m_lifecycleMap
private final java.util.List m_dependencies
private static final java.lang.String TYPE_SINGLETON
private static final java.lang.String TYPE_THREAD
private static final java.lang.String TYPE_POOLED
private static final java.lang.String TYPE_TRANSIENT
public MetaInfoEntry(java.lang.Class componentClass,
java.util.Properties properties,
java.util.List deps)
throws java.lang.ClassNotFoundException
componentClass - The Class for the component typeproperties - The Properties object for meta infojava.lang.ClassNotFoundException - if the component handler class could not be foundpublic MetaInfoEntry(RoleEntry roleEntry)
RoleEntry.roleEntry - The RoleEntry to convertpublic void makeReadOnly()
public java.lang.Class getComponentClass()
Class for the component type.Classpublic java.lang.Class getHandlerClass()
Class for the component type's
org.apache.avalon.fortress.impl.handler.ComponentHandler.Classpublic java.lang.String getConfigurationName()
public void addRole(java.lang.String role)
role - The new rolejava.lang.SecurityException - if this MetaInfoEntry is read-onlypublic boolean containsRole(java.lang.String role)
role - The role to checktrue if it doespublic java.util.Iterator getRoles()
public java.util.List getDependencies()
private java.lang.String getHandler(java.util.Properties meta)
meta - The properties object from the constructorpublic static final java.lang.String createShortName(java.lang.String className)
className - The classname of a component