Return-Path: Delivered-To: apmail-avalon-cvs-archive@www.apache.org Received: (qmail 91634 invoked from network); 29 Mar 2004 19:51:58 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 29 Mar 2004 19:51:58 -0000 Received: (qmail 90927 invoked by uid 500); 29 Mar 2004 19:51:49 -0000 Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 90870 invoked by uid 500); 29 Mar 2004 19:51:48 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 90857 invoked from network); 29 Mar 2004 19:51:48 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 29 Mar 2004 19:51:48 -0000 Received: (qmail 91604 invoked by uid 1438); 29 Mar 2004 19:51:58 -0000 Date: 29 Mar 2004 19:51:58 -0000 Message-ID: <20040329195158.91603.qmail@minotaur.apache.org> From: mcconnell@apache.org To: avalon-cvs@apache.org Subject: cvs commit: avalon/merlin/platform/xdocs/reference/component/artifacts index.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N mcconnell 2004/03/29 11:51:57 Modified: merlin/platform/xdocs/reference/component/artifacts index.xml Log: 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 @@
+

+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 +Logger, +Context, +Configuration, +Parameters, and +ServiceManager. +

+ +

+Two styles of artifact delivery are supported: +

+ + + + + + + + + + + + +
injection +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. +
phased +The phased artifact delivery strategy is based on a set of delivery interfaces (LogEnabled, Contextualizable, Configurable, Parameterizable and Serviceable). 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. +
+
+ +

+The Logger 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 getChildLogger() 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. +

+

+A logging channel may be supplied via constructor or under an implementation of the LogEnabled lifecycle stage interface. +

+

Example:

+ + /** + * 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" ); + } + +
--------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org For additional commands, e-mail: cvs-help@avalon.apache.org