mcconnell 2002/12/27 08:47:28 Modified: merlin/src/test/org/apache/avalon/playground StandardComponent.java Log: Aded configurable to the test component. Revision Changes Path 1.4 +18 -3 avalon-sandbox/merlin/src/test/org/apache/avalon/playground/StandardComponent.java Index: StandardComponent.java =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/src/test/org/apache/avalon/playground/StandardComponent.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- StandardComponent.java 19 Dec 2002 10:50:17 -0000 1.3 +++ StandardComponent.java 27 Dec 2002 16:47:28 -0000 1.4 @@ -70,8 +70,9 @@ * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a> */ public class StandardComponent extends AbstractLogEnabled - implements Contextualizable, Initializable, Startable, Disposable, StandardService + implements Contextualizable, Configurable, Initializable, Startable, Disposable, StandardService { + private Configuration m_config; private File m_home; private File m_work; @@ -94,7 +95,20 @@ m_work = context.getWorkingDirectory(); m_name = context.getName(); m_partition = context.getPartitionName(); - } + } + + //======================================================================= + // Configurable + //======================================================================= + + /** + * Supply of the the component configuration. + * @param config the configuration value + */ + public void configure( Configuration config ) + { + m_config = config; + } //======================================================================= // Initializable @@ -150,7 +164,8 @@ */ public void printMessage() { - getLogger().info( m_message ); + getLogger().info( m_config.getChild("message").getValue("") ); + getLogger().info( "listing context" + m_message ); } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>