avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon/merlin/platform/xdocs/reference/component/artifacts index.xml
Date Mon, 29 Mar 2004 19:51:58 GMT
mcconnell    2004/03/29 11:51:57

  Modified:    merlin/platform/xdocs/reference/component/artifacts
  Logger lifecycle artifact spec.
  Revision  Changes    Path
  1.3       +54 -0     avalon/merlin/platform/xdocs/reference/component/artifacts/index.xml
  Index: index.xml
  RCS file: /home/cvs/avalon/merlin/platform/xdocs/reference/component/artifacts/index.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.xml	29 Mar 2004 18:10:29 -0000	1.2
  +++ index.xml	29 Mar 2004 19:51:57 -0000	1.3
  @@ -28,7 +28,61 @@
       <section name="Lifecycle Artifacts">
  +      <p>
  +Component-based solutions leverage the principals of Inversersion of Control (IoC). This
principal leads to the notion that a component should be supplied with the resources it needs
in order to function.  Another way of looking at this is that the component code should not
be cluttered with content that is attempting to resolve resources relative to its environment.
Through the application of a meta-info model a container has available to it a complete description
of the component type and from this information can build the necessary resources that a component
needs. These resources are supplied to a component through a set of standard Avalon lifecycle
artificats.  These include 
  +<a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/logger/Logger.html">Logger</a>,

  +<a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/context/Context.html">Context</a>,

  +<a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/configuration/Configuration.html">Configuration</a>,

  +<a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/parameters/Parameters.html">Parameters</a>,
  +<a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/service/ServiceManager.html">ServiceManager</a>.
  +      </p>
  +      <p>
  +Two styles of artifact delivery are supported:
  +      </p>
  +      <subsection name="Delivery Strategies">
  +        <table>
  +          <tr>
  +            <td>injection</td>
  +            <td>
  +The artifact injection strategy enables the passing of artifacts via the component constructor.
 This approach minimises lines of code dealing with establishment, enables the allocation
of final variables, and eliminates the requirement for explict initialization of startup phases.
  +            </td>
  +          </tr>
  +          <tr>
  +            <td>phased</td>
  +            <td>
  +The phased artifact delivery strategy is based on a set of delivery interfaces (<a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/logger/LogEnabled.html">LogEnabled</a>,
<a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/context/Contextualizable.html">Contextualizable</a>,
<a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/configuration/Configurable.html">Configurable</a>,
<a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/parameters/Parameterizable.html">Parameterizable</a>
and <a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/service/Serviceable.html">Serviceable</a>).
 The advantage of phased delivery over the injection strategy relates to artifact re-assignment
by a component management subsystem. Phased artifact delivery is the traditional approach
used be earlier Avalon solutions.
  +            </td>
  +          </tr>
  +        </table>
  +      </subsection>
         <subsection name="Logger">
  +        <p>
  +The <a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/logger/Logger.html">Logger</a>
defines a implementation independent logging channel.  The logging channel supplied to a component
represents the root loggging channel for the component.  A component may aquire additional
subsidiary channels using the <a href="http://avalon.apache.org/framework/api/org/apache/avalon/framework/logger/Logger.html#getChildLogger(java.lang.String)">getChildLogger()</a>
operation.  The Logger interface exposes a set of operations to check if a particular logging
priority is enabled, thus enabling optimization of typically expensive string manipulation
operations related to log message construction. 
  +        </p>
  +        <p>
  +A logging channel may be supplied via constructor or under an implementation of the <a
lifecycle stage interface.
  +        </p>
  +  /**
  +   * Creation of a new widget. The implementation assigns 
  +   * the supplied logging channel as the default channel and 
  +   * constructs a subsidiary channel for connection related log 
  +   * messages.  Tgh
  +   *
  +   * @param logger a logging channel
  +   */
  +   public DefaultWidget( Logger logger ) 
  +   {
  +       m_logger = logger;
  +       m_connectionLogger = logger.getChildLogger( "connection" );
  +   }
         <subsection name="Context">

To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org

View raw message