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
The handler to set for this context.
|
Constructor and Description |
---|
HttpContext() |
Modifier and Type | Method and Description |
---|---|
abstract Object |
getAttribute(String name)
Returns an attribute value for container's configuration
and other data that can be used by Jakarta XML Web Services runtime.
|
abstract Set<String> |
getAttributeNames()
Returns all attribute names for container's configuration
and other data that can be used by Jakarta XML Web Services runtime.
|
abstract String |
getPath()
Returns the path for this context.
|
void |
setHandler(HttpHandler handler)
Jakarta XML Web Services runtime sets its handler during
Endpoint.publish(HttpContext) to handle
HTTP requests for this context. |
protected HttpHandler handler
public void setHandler(HttpHandler handler)
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 contextpublic abstract String getPath()
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 Object getAttribute(String name)
name
- attribute nameCopyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.