org.apache.excalibur.source.impl
Class FileSourceFactory
java.lang.Object
org.apache.excalibur.source.impl.FileSourceFactory
- All Implemented Interfaces:
- org.apache.avalon.framework.thread.ThreadSafe, SourceFactory, URIAbsolutizer
public class FileSourceFactory
- extends Object
- implements SourceFactory, org.apache.avalon.framework.thread.ThreadSafe, URIAbsolutizer
A factory for filesystem-based sources (see FileSource
).
- Version:
- $Id: FileSourceFactory.java,v 1.4 2004/02/28 11:47:24 cziegeler Exp $
- Author:
- Avalon Development Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileSourceFactory
public FileSourceFactory()
getSource
public Source getSource(String location,
Map parameters)
throws IOException,
MalformedURLException
- Description copied from interface:
SourceFactory
- Get a
Source
object.
The factory creates a new Source
object that can be used
by the application. However, when this source object is not needed
anymore it has to be released again using the SourceFactory.release(Source)
method. This is achieved by using SourceResolver.release(Source)
which
finds the appropriate SourceFactory
.
- Specified by:
getSource
in interface SourceFactory
- Parameters:
location
- The URI to resolve - this URI includes the scheme.parameters
- additionnal named parameters (optionnal and can be null
)
that drive the creation of the Source
object. Each implementation
must specify what parameters it accepts.
- Returns:
- the created source object.
- Throws:
IOException
- if the source couldn't be created for some reason.
MalformedURLException
- See Also:
SourceFactory.getSource(java.lang.String, java.util.Map)
release
public void release(Source source)
- Does nothing, since
FileSource
s don't need to be released.
- Specified by:
release
in interface SourceFactory
- Parameters:
source
- the source to release.- See Also:
SourceFactory.release(org.apache.excalibur.source.Source)
absolutize
public String absolutize(String baseURI,
String location)
- Specified by:
absolutize
in interface URIAbsolutizer
Copyright © 1997-2012 The Apache Software Foundation. All Rights Reserved.