|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.resource.DefaultResourceManager
public class DefaultResourceManager
Field Summary | |
---|---|
protected boolean |
firstCalled
|
protected List<ResourceResolver> |
registeredResolvers
|
Constructor Summary | |
---|---|
DefaultResourceManager()
|
|
DefaultResourceManager(List<? extends ResourceResolver> resolvers)
|
|
DefaultResourceManager(ResourceResolver resolver)
|
Method Summary | ||
---|---|---|
void |
addResourceResolver(ResourceResolver resolver)
Add a ResourceResolver . |
|
void |
addResourceResolvers(Collection<? extends ResourceResolver> resolvers)
|
|
InputStream |
getResourceAsStream(String name)
Open stream to resource. |
|
List<ResourceResolver> |
getResourceResolvers()
Get all the currently registered resolvers. |
|
protected void |
onFirstResolve()
|
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final List<ResourceResolver> registeredResolvers
protected boolean firstCalled
Constructor Detail |
---|
public DefaultResourceManager()
public DefaultResourceManager(ResourceResolver resolver)
public DefaultResourceManager(List<? extends ResourceResolver> resolvers)
Method Detail |
---|
protected void onFirstResolve()
public final <T> T resolveResource(String name, Class<T> type)
ResourceManager
ResourceResovler
objects until one
manages to resolve the resource
resolveResource
in interface ResourceManager
name
- name of resource to resolve.type
- type of resource to resolve.
public final <T> T resolveResource(String name, Class<T> type, List<ResourceResolver> resolvers)
ResourceManager
resolveResource
in interface ResourceManager
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.
public final InputStream getResourceAsStream(String name)
ResourceManager
getResourceAsStream
in interface ResourceManager
name
- name of resource to resolve.
public final void addResourceResolver(ResourceResolver resolver)
ResourceManager
ResourceResolver
. The newly added resolver
is added at the head of the list so the most recently added
will be queried first.
addResourceResolver
in interface ResourceManager
resolver
- the ResourceResolver
to
add. Duplicates will be ignored.public final void addResourceResolvers(Collection<? extends ResourceResolver> resolvers)
public final void removeResourceResolver(ResourceResolver resolver)
ResourceManager
ResourceResolver
.
removeResourceResolver
in interface ResourceManager
resolver
- the ResourceResolver
to remove.
If not previously registered, it is ignored.public final List<ResourceResolver> getResourceResolvers()
ResourceManager
getResourceResolvers
in interface ResourceManager
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |