public abstract class HttpContext extends Object
HttpHandler which is invoked to handle requests destined for that path on the associated container.
Container provides the implementation for this and it matches web service requests to corresponding HttpContext objects.
| Modifier and Type | Field and Description |
|---|---|
protected HttpHandler |
handler
|
| Constructor and Description |
|---|
HttpContext()
|
| Modifier and Type | Method and Description |
|---|---|
abstract Object |
getAttribute(String
Returns an attribute value for container's configuration and other data that can be used by jax-ws runtime.
|
abstract Set |
getAttributeNames()
Returns all attribute names for container's configuration and other data that can be used by jax-ws runtime.
|
abstract String |
getPath()
Returns the path for this context.
|
void |
setHandler(HttpHandler
JAX-WS runtime sets its handler during
Endpoint to handle HTTP requests for this context.
|
protected HttpHandlerhandler
public void setHandler(HttpHandlerhandler)
Endpoint.publish(HttpContext) to handle HTTP requests for this context. Container or its extensions use this handler to process the requests.
handler - the handler to set for this context
public abstract StringgetPath()
For servlet container, this is typically a url-pattern for an endpoint.
Endpoint's address for this context can be computed as follows:
HttpExchange exch = ...;
String endpointAddress =
exch.getScheme() + "://"
+ exch.getLocalAddress().getHostName()
+ ":" + exch.getLocalAddress().getPort()
+ exch.getContextPath() + getPath();
public abstract ObjectgetAttribute(String name)
name - attribute name