org.apache.cocoon.components.url
Class URLFactoryImpl

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.components.url.URLFactoryImpl
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.framework.thread.ThreadSafe, URLFactory

public class URLFactoryImpl
extends org.apache.avalon.framework.logger.AbstractLoggable
implements org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.context.Contextualizable, URLFactory

Version:
$Id: URLFactoryImpl.java,v 1.5.2.1 2002/05/31 14:22:38 vgritsenko Exp $
Author:
Giacomo Pati

Field Summary
protected  org.apache.avalon.framework.context.Context context
          The context
protected  java.util.Map factories
          The special URL factories
 
Fields inherited from interface org.apache.cocoon.components.url.URLFactory
ROLE
 
Constructor Summary
URLFactoryImpl()
           
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager manager)
          Set the current ComponentManager instance used by this Composable.
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
          Configure the URLFactories
 void contextualize(org.apache.avalon.framework.context.Context context)
          Get the context
 void dispose()
          Dispose
 java.net.URL getURL(java.lang.String location)
          Create a URL from a location.
 java.net.URL getURL(java.net.URL base, java.lang.String location)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected org.apache.avalon.framework.context.Context context
The context

factories

protected java.util.Map factories
The special URL factories
Constructor Detail

URLFactoryImpl

public URLFactoryImpl()
Method Detail

getURL

public java.net.URL getURL(java.lang.String location)
                    throws java.net.MalformedURLException
Create a URL from a location. This method supports specific pseudo-protocol as defined in its configuration
Specified by:
getURL in interface URLFactory
Parameters:
location - The location
Returns:
The URL pointed to by the location
Throws:
java.net.MalformedURLException - If the location is malformed

getURL

public java.net.URL getURL(java.net.URL base,
                           java.lang.String location)
                    throws java.net.MalformedURLException
Specified by:
getURL in interface URLFactory

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Get the context
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable

configure

public void configure(org.apache.avalon.framework.configuration.Configuration conf)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Configure the URLFactories
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable

compose

public void compose(org.apache.avalon.framework.component.ComponentManager manager)
             throws org.apache.avalon.framework.component.ComponentException
Set the current ComponentManager instance used by this Composable.
Specified by:
compose in interface org.apache.avalon.framework.component.Composable

dispose

public void dispose()
Dispose
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable


Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.