|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ResourceLoader
A ResourceLoader is a pluggable contract for loading resources.
Solder comes with a resource loader which uses the classpath to
locate resources, and a resource loader that uses the
ServletContext (if available).
To register a custom ResourceLoader you should implement this
interface, and register it as a ServiceProvider for the ResourceLoader service.
ResourceProvider,
Resource| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jboss.solder.util.Sortable |
|---|
Sortable.Comparator |
| Method Summary | |
|---|---|
java.net.URL |
getResource(java.lang.String name)
Get the URL for a resource. |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Get the InputStream for a resource. |
java.util.Collection<java.net.URL> |
getResources(java.lang.String name)
Get the URLs known to all resource loaders for a given name. |
java.util.Collection<java.io.InputStream> |
getResourcesAsStream(java.lang.String name)
Get the input streams known to all resource loaders for a given name. |
| Methods inherited from interface org.jboss.solder.util.Sortable |
|---|
getPrecedence |
| Method Detail |
|---|
java.net.URL getResource(java.lang.String name)
Get the URL for a resource.
The resource loaders are searched in precedence order, stopping when a resource is found.
name - the resource to get the URL for
URL, or null if the resource does not exist
java.lang.RuntimeException - if an error occurs loading the resourcejava.io.InputStream getResourceAsStream(java.lang.String name)
Get the InputStream for a resource.
The resource loaders are searched in precedence order, stopping when a resource is found.
name - the resource to get the InputStream for
InputStream, or null if the resource does not exist
java.lang.RuntimeException - if an error occurs loading the resourcejava.util.Collection<java.net.URL> getResources(java.lang.String name)
Get the URLs known to all resource loaders for a given name.
name - the resource to get the URLs for
java.lang.RuntimeException - if an error occurs loading the resourcejava.util.Collection<java.io.InputStream> getResourcesAsStream(java.lang.String name)
Get the input streams known to all resource loaders for a given name.
name - name the resource to get the input streams for
java.lang.RuntimeException - if an error occurs loading the resource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||