org.apache.excalibur.source.impl
Class ResourceSourceFactory

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.excalibur.source.impl.ResourceSourceFactory
All Implemented Interfaces:
Component, LogEnabled, SourceFactory, ThreadSafe

public class ResourceSourceFactory
extends AbstractLogEnabled
implements SourceFactory, ThreadSafe

A factory for the Resource protocol

Version:
$Id: ResourceSourceFactory.java,v 1.4 2004/02/28 11:47:24 cziegeler Exp $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
 
Constructor Summary
ResourceSourceFactory()
           
 
Method Summary
 Source getSource(java.lang.String location, java.util.Map parameters)
          Get a Source object.
 void release(Source source)
          Release a Source object.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceSourceFactory

public ResourceSourceFactory()
Method Detail

getSource

public Source getSource(java.lang.String location,
                        java.util.Map parameters)
                 throws java.net.MalformedURLException,
                        java.io.IOException,
                        SourceException
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 release(Source) method.

Specified by:
getSource in interface SourceFactory
Parameters:
location - The URI to resolve - this URI includes the protocol.
parameters - This is optional.
Returns:
the created source object.
Throws:
java.io.IOException - if the source couldn't be created for some reason.
java.net.MalformedURLException
SourceException

release

public void release(Source source)
Release a Source object.

Specified by:
release in interface SourceFactory
Parameters:
source - the source to release.


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.