adammurdoch 2002/06/15 00:54:54
Added: container/src/java/org/apache/myrmidon/interfaces/service
DefaultServiceFactory.java
Log:
Add a basic ServiceFactory impl.
Revision Changes Path
1.1 jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/service/DefaultServiceFactory.java
Index: DefaultServiceFactory.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.myrmidon.interfaces.service;
/**
* A default service factory implementation.
*
* @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
* @version $Revision: 1.1 $ $Date: 2002/06/15 07:54:54 $
*/
public class DefaultServiceFactory
implements ServiceFactory
{
private final String m_clasname;
private final ClassLoader m_loader;
public DefaultServiceFactory( final String clasname, final ClassLoader loader )
{
m_clasname = clasname;
m_loader = loader;
}
/**
* Create a service that corresponds to this factory.
*/
public Object createService()
throws Exception
{
return m_loader.loadClass( m_clasname).newInstance();
}
}
--
To unsubscribe, e-mail: <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
|