mcconnell 2004/01/14 08:34:55
Added: merlin/activation/impl maven.xml
merlin/activation/impl/src/test/org/apache/avalon/activation/appliance/impl
DummyDeploymentModel.java
merlin/kernel/api/src/java/org/apache/avalon/merlin
KernelContext.java
Log:
Housekeeping.
Revision Changes Path
1.1 avalon/merlin/activation/impl/maven.xml
Index: maven.xml
===================================================================
<project
default="jar:install-snapshot"
xmlns:maven="jelly:maven"
xmlns:j="jelly:core"
xmlns:util="jelly:util"
xmlns:ant="jelly:ant">
<postGoal name="test:compile">
<mkdir dir="${basedir}/target/test-classes/repository/avalon-framework/jars"/>
<ant:copy
toDir="${basedir}/target/test-classes/repository/avalon-framework/jars"
file="${pom.getDependencyPath('avalon-framework:avalon-framework-impl')}"/>
</postGoal>
</project>
1.1
avalon/merlin/activation/impl/src/test/org/apache/avalon/activation/appliance/impl/DummyDeploymentModel.java
Index: DummyDeploymentModel.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
"Apache Software Foundation" must not be used to endorse or promote
products derived from this software without prior written
permission. For written permission, please contact [EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.avalon.activation.appliance.impl;
import org.apache.avalon.activation.appliance.Deployable;
import org.apache.avalon.composition.data.Mode;
import org.apache.avalon.composition.model.DeploymentModel;
import org.apache.avalon.composition.model.AssemblyException;
import org.apache.avalon.meta.info.DependencyDescriptor;
import org.apache.avalon.meta.info.ServiceDescriptor;
import org.apache.avalon.meta.info.StageDescriptor;
import org.apache.avalon.framework.logger.Logger;
public class DummyDeploymentModel
implements DeploymentModel
{
private long m_timeout;
private Deployable m_deployable;
DummyDeploymentModel( Deployable deployable, long timeout )
{
m_timeout = timeout;
m_deployable = deployable;
}
/**
* Return the name of the model.
* @return the name
*/
public String getName()
{
return "dummy";
}
/**
* Return the model partition path.
* @return the path
*/
public String getPath()
{
return "/dummy";
}
/**
* Return the model fully qualified name.
* @return the fully qualified name
*/
public String getQualifiedName()
{
return "/dummy";
}
/**
* Return the mode of model establishment.
* @return the mode
*/
public Mode getMode()
{
return null;
}
/**
* Set the runtime handler for the model.
* @param handler the runtime handler
*/
public void setHandler( Object handler )
{
}
/**
* Get the assigned runtime handler for the model.
* @return the runtime handler
*/
public Object getHandler()
{
return m_deployable;
}
/**
* Return the assigned logging channel.
* @return the logging channel
*/
public Logger getLogger()
{
return null;
}
//-----------------------------------------------------------
// service production
//-----------------------------------------------------------
/**
* Return the set of services produced by the model.
* @return the services
*/
public ServiceDescriptor[] getServices()
{
return new ServiceDescriptor[0];
}
/**
* Return TRUE is this model is capable of supporting a supplied
* depedendency.
* @return true if this model can fulfill the dependency
*/
public boolean isaCandidate( DependencyDescriptor dependency )
{
return true;
}
/**
* Return TRUE is this model is capable of supporting a supplied
* stage dependency.
* @return true if this model can fulfill the dependency
*/
public boolean isaCandidate( StageDescriptor stage )
{
return true;
}
//-----------------------------------------------------------
// composite assembly
//-----------------------------------------------------------
/**
* Returns the assembled state of the model.
* @return true if this model is assembled
*/
public boolean isAssembled()
{
return true;
}
/**
* Assemble the model.
* @exception Exception if an error occurs during model assembly
*/
public void assemble() throws AssemblyException
{
}
/**
* Return the set of models consuming this model.
* @return the consumers
*/
public DeploymentModel[] getConsumerGraph()
{
return null;
}
/**
* Return the set of models supplying this model.
* @return the providers
*/
public DeploymentModel[] getProviderGraph()
{
return null;
}
/**
* Disassemble the model.
*/
public void disassemble(){}
/**
* Return the set of models assigned as providers.
* @return the providers consumed by the model
* @exception IllegalStateException if invoked prior to
* the completion of the assembly phase
*/
public DeploymentModel[] getProviders()
{
return null;
}
/**
* Returns the maximum allowable time for deployment.
*
* @return the maximum time expressed in millisecond of how
* long a deployment may take.
*/
public long getDeploymentTimeout()
{
return m_timeout;
}
}
1.1
avalon/merlin/kernel/api/src/java/org/apache/avalon/merlin/KernelContext.java
Index: KernelContext.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Jakarta", "Apache Avalon", "Avalon Framework" and
"Apache Software Foundation" must not be used to endorse or promote
products derived from this software without prior written
permission. For written permission, please contact [EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.avalon.merlin;
import java.net.URL;
import java.io.File;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.composition.model.ContainmentModel;
/**
* The context argument supplied to a new kernel instance.
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen McConnell</a>
* @version $Revision: 1.1 $ $Date: 2004/01/14 16:34:55 $
*/
public interface KernelContext
{
/**
* Return the assigned logging channel.
* @return the loggging channel
*/
Logger getLogger();
/**
* Return the facilities model.
* @return the internal container facilities
*/
ContainmentModel getFacilitiesModel();
/**
* Return the application model.
* @return the root application model
*/
ContainmentModel getApplicationModel();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]