|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.api.ResourceLoader
public abstract class ResourceLoader
Used to locate resources for jax-ws extensions. Using this, extensions do not to have to write container specific code to locate resources.
| Constructor Summary | |
|---|---|
ResourceLoader()
|
|
| Method Summary | |
|---|---|
abstract java.net.URL |
getResource(java.lang.String resource)
Returns the actual location of the resource from the 'resource' arg that represents a virtual locaion of a file understood by a container. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceLoader()
| Method Detail |
|---|
public abstract java.net.URL getResource(java.lang.String resource)
throws java.net.MalformedURLException
Extensions can get hold of this object using Container.
ResourceLoader loader = container.getSPI(ResourceLoader.class);
URL catalog = loader.get("jax-ws-catalog.xml");
A ResourceLoader for servlet environment, may do the following.
URL getResource(String resource) {
return servletContext.getResource("/WEB-INF/"+resource);
}
resource - Designates a path that is understood by the container. The
implementations must support "jax-ws-catalog.xml" resource.
java.net.MalformedURLException - if there is an error in creating URL
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||