org.apache.cocoon.components.source.impl
Class SourceFactoryWrapper

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.source.impl.SourceFactoryWrapper
All Implemented Interfaces:
Disposable, Composable, Configurable, Contextualizable, LogEnabled, ThreadSafe, SourceFactory

public final class SourceFactoryWrapper
extends AbstractLogEnabled
implements SourceFactory, ThreadSafe, Configurable, Disposable, Composable, Contextualizable

This class wraps a Cocoon SourceFactory and makes it usable within the Avalon Excalibur source resolving architecure. The main purpose is to avoid recoding existing factories.

Version:
CVS $Id: SourceFactoryWrapper.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler

Field Summary
 
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
 
Constructor Summary
SourceFactoryWrapper()
           
 
Method Summary
 void compose(ComponentManager manager)
          Set the current ComponentManager instance used by this Composable.
 void configure(Configuration conf)
          Configure the SourceFactories
 void contextualize(Context context)
          Get the context
 void dispose()
          Dispose
 Source getSource(String location, 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

SourceFactoryWrapper

public SourceFactoryWrapper()
Method Detail

configure

public void configure(Configuration conf)
               throws ConfigurationException
Configure the SourceFactories

Specified by:
configure in interface Configurable
Throws:
ConfigurationException

contextualize

public void contextualize(Context context)
                   throws ContextException
Get the context

Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

compose

public void compose(ComponentManager manager)
             throws ComponentException
Set the current ComponentManager instance used by this Composable.

Specified by:
compose in interface Composable
Throws:
ComponentException

dispose

public void dispose()
Dispose

Specified by:
dispose in interface Disposable

getSource

public Source getSource(String location,
                        Map parameters)
                 throws MalformedURLException,
                        IOException
Get a Source object.

Specified by:
getSource in interface SourceFactory
Parameters:
parameters - This is optional.
Throws:
MalformedURLException
IOException

release

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

Specified by:
release in interface SourceFactory


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.