|
||||||||||
| 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 | |
|---|---|
URL |
getResource(String name)
Get the URL for a resource. |
InputStream |
getResourceAsStream(String name)
Get the InputStream for a resource. |
Collection<URL> |
getResources(String name)
Get the URLs known to all resource loaders for a given name. |
Collection<InputStream> |
getResourcesAsStream(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 |
|---|
URL getResource(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
RuntimeException - if an error occurs loading the resourceInputStream getResourceAsStream(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
RuntimeException - if an error occurs loading the resourceCollection<URL> getResources(String name)
Get the URLs known to all resource loaders for a given name.
name - the resource to get the URLs for
RuntimeException - if an error occurs loading the resourceCollection<InputStream> getResourcesAsStream(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
RuntimeException - if an error occurs loading the resource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||