org.apache.geronimo.kernel.classloader
Interface ResourceFinder

All Known Implementing Classes:
UrlResourceFinder

public interface ResourceFinder

Abstraction of resource searching policy. Given resource name, the resource finder performs implementation-specific lookup, and, if it is able to locate the resource, returns the handle(s) or URL(s) of it.


Method Summary
 URL findResource(String name)
          Find the resource by name and return URL of it if found.
 Enumeration findResources(String name)
          Find all resources with given name and return enumeration of their URLs.
 ResourceHandle getResource(String name)
          Get the resource by name and, if found, open connection to it and return the handle of it.
 

Method Detail

findResource

URL findResource(String name)
Find the resource by name and return URL of it if found.

Parameters:
name - the resource name
Returns:
resource URL or null if resource was not found

findResources

Enumeration findResources(String name)
Find all resources with given name and return enumeration of their URLs.

Parameters:
name - the resource name
Returns:
enumeration of resource URLs (possibly empty).

getResource

ResourceHandle getResource(String name)
Get the resource by name and, if found, open connection to it and return the handle of it.

Parameters:
name - the resource name
Returns:
resource handle or null if resource was not found


Copyright © 2006 Apache Software Foundation. All Rights Reserved.