Context Directive

Description

A context directive describes information that Merlin uses to build a context instance that will be supplied to a target component during the contextualization lifecycle stage.

Attributes

Attribute Required Description
class no The classname of a context implementation class. The class must implement a constructor that takes a java.util.Map instance as a single constructor argument. The supplied map shall be used by the implementation as source of keyed context entries.

Nested Elements

Element Cardinality Description
entry n A context entry creation directive.

Sample XML

   <component name="demo" class="MyDemoComponent">
     <context class="org.apache.avalon.playground.basic.BasicContextImp">
       <entry key="home">
         <import key="urn:avalon:home"/>
       </entry>
       <entry key="location">
         <constructor>Paris</constructor>
       </entry>
     </context>
   </component>