KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > source > ResourceSourceFactory


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.excalibur.source;
9
10 import org.apache.avalon.framework.component.Component;
11 import org.apache.avalon.framework.logger.AbstractLogEnabled;
12 import org.apache.avalon.framework.thread.ThreadSafe;
13
14 import java.io.IOException JavaDoc;
15 import java.net.MalformedURLException JavaDoc;
16
17 /**
18  * A factory for the Resource protocol
19  * @author <a HREF="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
20  * @version $Id: ResourceSourceFactory.java,v 1.3 2002/01/03 13:06:18 cziegeler Exp $
21  */

22 public class ResourceSourceFactory
23 extends AbstractLogEnabled
24 implements SourceFactory, ThreadSafe
25 {
26
27     /**
28      * Get a <code>Source</code> object.
29      * @param parameters This is optional.
30      */

31     public Source getSource(String JavaDoc location, SourceParameters parameters)
32     throws MalformedURLException JavaDoc, IOException JavaDoc
33     {
34         if (this.getLogger().isDebugEnabled() )
35         {
36             this.getLogger().debug("Creating source object for " + location);
37         }
38         return new ResourceSource(location);
39     }
40
41 }
42
Popular Tags