org.mmbase.util
Class ResourceLoader.PathURLStreamHandler
java.lang.Object
java.net.URLStreamHandler
org.mmbase.util.ResourceLoader.PathURLStreamHandler
- All Implemented Interfaces:
- Comparable<ResourceLoader.PathURLStreamHandler>
- Direct Known Subclasses:
- NodeURLStreamHandlerFactory.NodeURLStreamHandler, ResourceLoader.AbstractFileURLStreamHandler, ResourceLoader.ClassLoaderURLStreamHandler, ResourceLoader.ServletResourceURLStreamHandler
- Enclosing class:
- ResourceLoader
abstract static class ResourceLoader.PathURLStreamHandler
- extends URLStreamHandler
- implements Comparable<ResourceLoader.PathURLStreamHandler>
Extension URLStreamHandler, used for the 'sub' Handlers, entries of 'roots' in ResourceLoader are of this type.
| Methods inherited from class java.net.URLStreamHandler |
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm |
parent
protected final ResourceLoader parent
weight
protected int weight
ResourceLoader.PathURLStreamHandler
ResourceLoader.PathURLStreamHandler(ResourceLoader p)
createSubHandler
abstract ResourceLoader.PathURLStreamHandler createSubHandler(ResourceLoader parent)
openConnection
public abstract URLConnection openConnection(String name)
- We need an openConnection by name only, and public.
getName
protected abstract String getName(URL u)
- When a URL has been created, in
openConnection(String), this method can make a 'name' of it again.
getResources
Enumeration<URL> getResources(String name)
throws IOException
- Returns a List of URL's with the same name. Defaults to one URL.
- Throws:
IOException
openConnection
protected URLConnection openConnection(URL u)
throws IOException
- Specified by:
openConnection in class URLStreamHandler
- Throws:
IOException
getPaths
abstract Set<String> getPaths(Set<String> results,
Pattern pattern,
boolean recursive,
boolean directories)
setWeight
public void setWeight(int w)
compareTo
public int compareTo(ResourceLoader.PathURLStreamHandler o)
- Specified by:
compareTo in interface Comparable<ResourceLoader.PathURLStreamHandler>
getResourceNode
public Integer getResourceNode(String name)
- Since:
- MBase-2.0
toString
public String toString()
- Overrides:
toString in class Object
MMBase 2.0-SNAPSHOT - null