Package org.ametys.core.cocoon.source
Class ProxySourceFactory
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.core.cocoon.source.ProxySourceFactory
- All Implemented Interfaces:
Component
,Configurable
,LogEnabled
,Serviceable
,ThreadSafe
,SourceFactory
- Direct Known Subclasses:
KernelSourceFactory
public class ProxySourceFactory
extends AbstractLogEnabled
implements SourceFactory, ThreadSafe, Serviceable, Configurable
Factory for reading files in one protocol and switch to others if not found.
Configuration should be like:
<match>kernel://(.*)</match>
<protocols>
<protocol>resource://org/ametys/runtime/kernel/{1}</protocol>
<protocol>context://kernel/{1}</protocol>
</protocols>
-
Field Summary
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Configuration configuration) void
void
service
(ServiceManager manager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_matcher
URI matcher -
_protocols
Proxied sources
-
-
Constructor Details
-
ProxySourceFactory
public ProxySourceFactory()
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getSource
- Specified by:
getSource
in interfaceSourceFactory
- Throws:
IOException
MalformedURLException
-
release
- Specified by:
release
in interfaceSourceFactory
-