You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/04/20 14:56:27 UTC
cvs commit: avalon-sandbox/merlin/merlin-smp/src/tutorial/includes/src/java/tutorial TestComponent.xinfo TestComponent.java
mcconnell 2003/04/20 05:56:27
Added: merlin/merlin-smp/src/tutorial/includes/src/java/tutorial
TestComponent.xinfo TestComponent.java
Log:
Test component that logs a configuration message enabling demonstration of multiple configuration imports across of compound deployment model.
Revision Changes Path
1.1 avalon-sandbox/merlin/merlin-smp/src/tutorial/includes/src/java/tutorial/TestComponent.xinfo
Index: TestComponent.xinfo
===================================================================
<?xml version="1.0"?>
<!DOCTYPE type
PUBLIC "-//AVALON/Type DTD Version 1.0//EN"
"http://avalon.apache.org/dtds/meta/type_1_1.dtd" >
<type>
<info>
<name>test</name>
<version>1.0</version>
</info>
</type>
1.1 avalon-sandbox/merlin/merlin-smp/src/tutorial/includes/src/java/tutorial/TestComponent.java
Index: TestComponent.java
===================================================================
package tutorial;
import java.io.File;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.context.Contextualizable;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.ContextException;
import org.apache.avalon.framework.service.Serviceable;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.activity.Initializable;
/**
* HelloComponent from Merlin's Tutorial
*
* @avalon.meta.version 1.0
* @avalon.meta.name test
* @author Stephen McConnell
*/
public class TestComponent extends AbstractLogEnabled implements
Configurable
{
/**
* Configuration of the component by the container. The
* implementation gets a child element named 'source' and
* assigns log the value.
*
* @param config the component configuration
* @exception ConfigurationException if a configuration error occurs
*/
public void configure( Configuration config ) throws
ConfigurationException
{
getLogger().info( "source: " + config.getChild( "source" ).getValue( "unknown" ) );
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org