mcconnell 2004/04/01 19:51:35 Modified: merlin/platform/xdocs/reference/component/artifacts context.xml manager.xml merlin/platform/xdocs/reference/system index.xml Log: Context updates and service manager updates. Revision Changes Path 1.3 +1 -1 avalon/merlin/platform/xdocs/reference/component/artifacts/context.xml Index: context.xml =================================================================== RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/component/artifacts/context.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- context.xml 2 Apr 2004 02:35:13 -0000 1.2 +++ context.xml 2 Apr 2004 03:51:35 -0000 1.3 @@ -31,7 +31,7 @@ <subsection name="Overview"> <p> -A component may be supplied with a context object either by constructor or through an implementation of the <a href="">Contextualizable</a> lifecycle artifact delivery interface. A context object is typically used to provide standard environment information to a component. It may also be used a mechanisms to deliver domain specific resources to a component. +A component may be supplied with a context object either by constructor or through an implementation of the <a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/context/Contextualizable.html">Contextualizable</a> lifecycle artifact delivery interface. A context object is typically used to provide standard environment information to a component. It may also be used a mechanisms to deliver domain specific resources to a component. </p> <p> 1.2 +46 -2 avalon/merlin/platform/xdocs/reference/component/artifacts/manager.xml Index: manager.xml =================================================================== RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/component/artifacts/manager.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- manager.xml 31 Mar 2004 12:57:23 -0000 1.1 +++ manager.xml 2 Apr 2004 03:51:35 -0000 1.2 @@ -29,11 +29,55 @@ <section name="Service Manager Artifact"> <subsection name="Overview"> - <p>IN PREP</p> + <p> +A <a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/service/ServiceManager.html"> ServiceManager </a> is used as a mechanisms to provide dependent services to a component. A component implementation declares dependencies using the <a href="http://avalon.apache.org/meta/tools/tags/dependency.html">@avalon.dependency</a> tag. Dependencies may be declared relative to the component constructor or through the optional <a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/service/Serviceable.html">Serviceable</a> delivery interface. + </p> + <p><i>Example of a constructor based declaration of service dependencies.</i></p> +<source> + /** + * Creation of a new instance. The component receives + * a service manager via constructor that is pre-populated + * with services based on the avalon.dependency declarations. + * + * @param manager the service manager + * + * @avalon.dependency type="tutorial.RandomGenerator" key="random" + * @avalon.dependency type="tutorial.Identifiable" + */ + public DefaultWidget( ServiceManager manager ) + throws ServiceException + { + m_random = (RandomGenerator) manager.lookup( "random" ); + m_identifiable = (Identifiable) manager.lookup( + Identifiable.class.getName() ); + } +</source> </subsection> <subsection name="Lookup and Release Semantics"> - <p>IN PREP</p> + <p> +Services are aquired by passing the dependency key under the lookup operation. If no key is declared, the component can aquire the service using the value of the type attribute. When a component no longer requires a service it can relase the service, thereby notifying the container that the service instance is no longer required. While release of a service is optional, component authors shyould be aware that the component implementation underlying the service may be pooled. As such, release of the service may have a direct impact on memory consumption and overall performance. + </p> + <p><i>Example of an aquisition and relace cycle.</i></p> +<source> + /** + * Creation of a new instance during which a service is aquired, + * used, and released. + * + * @param manager the service manager + * + * @avalon.dependency type="tutorial.RandomGenerator" key="random" + */ + public DefaultWidget( ServiceManager manager ) + throws ServiceException + { + RandomGenerator random = + (RandomGenerator) manager.lookup( "random" ); + doSomething( random.getValue() ); + manager.release( random ); + } +</source> + </subsection> </section> 1.2 +6 -2 avalon/merlin/platform/xdocs/reference/system/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/system/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- index.xml 1 Apr 2004 23:49:12 -0000 1.1 +++ index.xml 2 Apr 2004 03:51:35 -0000 1.2 @@ -33,11 +33,15 @@ <tr><th>Topic</th><th>Summary</th></tr> <tr> <td><a href="properties.html">System Properties</a></td> - <td>IN PREP</td> + <td> +The Merlin kernel is established using the <a href="http://avalon.apache.org/repository">Avalon Repository</a> resource management system under the application key <strong>"merlin"</strong>. The complete specification of system properties (description and default values) together with supported property file locations are defined here. + </td> </tr> <tr> <td><a href="kernel/index.html">System Configuration</a></td> - <td>IN PREP</td> + <td> +Additional parameters may be defined at the level of the merlin kernel. These parameters concern security profiles, root container and classloader, and the application repository. + </td> </tr> </table> </subsection>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]