|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.dpml.lang.AbstractDirective
net.dpml.metro.data.ComponentDirective
public class ComponentDirective
Definition of the criteria for an explicit component profile. A profile, when included within the scope of a container declaration will be instantiated in the model as an EXPLICIT component profile resulting in the initiation of dependency resolution relative to the component as the target deployment objective. Multiple supplementary profiles may be packaged in a .xprofiles resources and will be assigned to the container automatically. In the absence of explicit or packaged profile directives, an implicit profile will be created for any component types declared under a jar manifest.
XML
A component element declares the profile to be applied during the instantiation of a component type. It includes a name and class declaration, logging directives (resolved relative to the component's container), context creation criteria, together with configuration or parameters information.
<!-- Declaration of the services hosted by this container. Service container here will be managed relative to other provider components at the same level and may be serviced by components declared in parent container. --> <component name="complex" class="org.apache.avalon.playground.ComplexComponent" activation="startup"> <!-- Priority and target assignments for component specific logging categrories. --> <categories priority="DEBUG"> <category name="init" priority="DEBUG" /> </categories> <!-- Context entry directives are normally only required in the case where the component type declares a required context type and entry values. Generally speaking, a component will normally qualify it's instantiation criteria through a configuration declaration. Any context values defined at this level will override context values supplied by the container. The following two context directives for "location" and "home" demonstrate programatics creation of context values. The first entry declares that the context value to be assigned to the key "location" shall be the String value "Paris". The second context enty assignes the container's context value for "urn:avalon:home" to the component's context key of "home". --> <context> <entry key="location">Paris</entry> <include name="urn:avalon:home" key="home"/> </context> </component>
Constructor Summary | |
---|---|
ComponentDirective(String name,
ActivationPolicy activation,
CollectionPolicy collection,
LifestylePolicy lifestyle,
String classname,
CategoriesDirective categories,
ContextDirective context,
PartReference[] parts,
URI uri)
Creation of a new deployment profile. |
|
ComponentDirective(String name,
String classname)
Creation of a new profile. |
Method Summary | |
---|---|
int |
compareTo(Object object)
Compare this object with the supplied object. |
boolean |
equals(Object other)
Test if the supplied object is equal to this object. |
ActivationPolicy |
getActivationPolicy()
Get the activation policy for the profile. |
ComponentDirective |
getBaseDirective()
Return the base directive. |
DefaultComposition |
getBasePart()
Return the base part. |
URI |
getBaseURI()
Return the base directive uri. |
CategoriesDirective |
getCategoriesDirective()
Return the logging categories for the profile. |
String |
getClassname()
Return the component type classname. |
CollectionPolicy |
getCollectionPolicy()
Return the component collection policy. |
ContextDirective |
getContextDirective()
Return the context directive for the profile. |
Directive |
getDirective(String key)
Retrieve an identified directive. |
LifestylePolicy |
getLifestylePolicy()
Return the component lifestyle policy. |
String |
getName()
Return the profile name. |
PartReference[] |
getPartReferences()
Returns the parts declared by this component type. |
int |
hashCode()
Return the hashcode for the instance. |
String |
toString()
Returns a string representation of the profile. |
Methods inherited from class net.dpml.lang.AbstractDirective |
---|
equals, hashArray, hashValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ComponentDirective(String name, String classname) throws IOException
name
- the name to assign to the component deployment scenarioclassname
- the classname of the component type
IOException
- if an IO exception occurspublic ComponentDirective(String name, ActivationPolicy activation, CollectionPolicy collection, LifestylePolicy lifestyle, String classname, CategoriesDirective categories, ContextDirective context, PartReference[] parts, URI uri) throws IOException
name
- the name to assign to the created profileactivation
- the component activation policycollection
- the component garbage collection policylifestyle
- the component lifestyle policyclassname
- the component classnamecategories
- logging categoriescontext
- context directiveparts
- the component internal partsuri
- URI of the component super-definition
IOException
- if an IO exception occursMethod Detail |
---|
public PartReference[] getPartReferences()
public Directive getDirective(String key)
key
- the directive key
public String getName()
public CategoriesDirective getCategoriesDirective()
public ActivationPolicy getActivationPolicy()
ActivationPolicy.SYSTEM
,
ActivationPolicy.STARTUP
,
ActivationPolicy.DEMAND
public String getClassname()
public LifestylePolicy getLifestylePolicy()
public CollectionPolicy getCollectionPolicy()
public ContextDirective getContextDirective()
public URI getBaseURI()
public ComponentDirective getBaseDirective()
public DefaultComposition getBasePart()
public String toString()
toString
in class Object
public int compareTo(Object object)
compareTo
in interface Comparable
object
- the object to compare with
public boolean equals(Object other)
equals
in class AbstractDirective
other
- the object to compare with this instance
public int hashCode()
hashCode
in class AbstractDirective
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |