|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceManager
Locates resources that are used at runtime. The
ResourceManager
queries registered
ResourceResolver
to find resources.
Method Summary | ||
---|---|---|
void |
addResourceResolver(ResourceResolver resolver)
Add a ResourceResolver . |
|
InputStream |
getResourceAsStream(String name)
Open stream to resource. |
|
List<ResourceResolver> |
getResourceResolvers()
Get all the currently registered resolvers. |
|
void |
removeResourceResolver(ResourceResolver resolver)
Remove a ResourceResolver . |
|
|
resolveResource(String name,
Class<T> type)
Resolve a resource. |
|
|
resolveResource(String name,
Class<T> type,
List<ResourceResolver> resolvers)
Resolve a resource with via a specified list of resovlers. |
Method Detail |
---|
<T> T resolveResource(String name, Class<T> type)
ResourceResovler
objects until one
manages to resolve the resource
name
- name of resource to resolve.type
- type of resource to resolve.
<T> T resolveResource(String name, Class<T> type, List<ResourceResolver> resolvers)
name
- name of resource to resolve.type
- type of resource to resolve.resolvers
- list of ResourceResolvers to search.
- Returns:
- the resolved resource or null if nothing found.
InputStream getResourceAsStream(String name)
name
- name of resource to resolve.
void addResourceResolver(ResourceResolver resolver)
ResourceResolver
. The newly added resolver
is added at the head of the list so the most recently added
will be queried first.
resolver
- the ResourceResolver
to
add. Duplicates will be ignored.void removeResourceResolver(ResourceResolver resolver)
ResourceResolver
.
resolver
- the ResourceResolver
to remove.
If not previously registered, it is ignored.List<ResourceResolver> getResourceResolvers()
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |