HttpContext represents a mapping between the root java.net.URI
path of an application to a HttpHandler which is invoked to handle
requests destined for that path on the associated HttpServer or
HttpsServer.
HttpContext instances are created by the create methods in
HttpServer and HttpsServer.
A chain of Filter objects can be added to a HttpContext.
All exchanges processed by the context can be pre- and post-processed by each
Filter in the chain.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract Map | Returns: aMap containing the attributes of this contextReturns a mutable |
| public abstract Authenticator | |
| public abstract List | Returns: aList containing the filters of this context |
| public abstract HttpHandler | |
| public abstract String | |
| public abstract HttpServer | |
| public abstract Authenticator | Returns: the previousAuthenticator, if any set, or null otherwise.the auth)Authenticator to set. If null then any previously
set Authenticator is removed, and client authentication
will no longer be required.Sets the |
| public abstract void | setHandler(HttpHandler
the handler to set for this context handler)Sets the handler for this context, if not already set. |
| HttpContext | back to summary |
|---|---|
| protected HttpContext() Constructor for subclasses to call. | |
| getAttributes | back to summary |
|---|---|
| public abstract Map Returns a mutable Every attribute stored in this | |
| getAuthenticator | back to summary |
|---|---|
| public abstract Authenticator getAuthenticator() Returns the currently set
| |
| getFilters | back to summary |
|---|---|
| public abstract List Returns this context's | |
| getHandler | back to summary |
|---|---|
| public abstract HttpHandler getHandler() Returns the handler for this context.
| |
| getPath | back to summary |
|---|---|
| public abstract String getPath() Returns the path this context was created with.
| |
| getServer | back to summary |
|---|---|
| public abstract HttpServer getServer() Returns the server this context was created with.
| |
| setAuthenticator | back to summary |
|---|---|
| public abstract Authenticator setAuthenticator(Authenticator auth) Sets the
| |
| setHandler | back to summary |
|---|---|
| public abstract void setHandler(HttpHandler handler) Sets the handler for this context, if not already set.
| |