View Javadoc

1   /*
2   * JBoss, the OpenSource EJB server
3   *
4   * Distributable under LGPL license.
5   * See terms of license at gnu.org.
6   */
7   package org.backsource.utils.resource;
8   
9   import java.net.URL;
10  import java.net.MalformedURLException;
11  /***
12   * 
13   * <p>Return a valid URL from URI.
14   *
15   * <p> An URLFactory is used by the URIFactory to translate an URI into an URL. The YRLFactory is not allowed to use the URI.getURL() to construct an url, but must know how to decode the URI:s part to find its resource.
16   *
17   * <p>A particualar URL factory covers resources/URI:s by a specific scheme, wich it knows how to look up. The usage is to register an URLFactory with the URIFactory for a specific schema.
18   *
19   * @author Peter Antman
20   * @version $Revision: 1.1.1.1 $
21   */
22  
23  public interface URLFactory  {
24     /***
25      * Contstruct an URL from URI without using uri.getURL().
26      */
27     public URL getURL(URI uri) throws  MalformedURLException;
28      
29  } // URLFactory