HttpHandler which is invoked to handle requests destined
for the protocol/path on the associated HttpServer.
HttpContext instances are created by HttpServer#createContext(String, String, HttpHandler, Object)
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private Authenticator | |
| private final AuthFilter | |
| private HttpHandler | |
| private final String | |
| private final String | |
| private final ServerImpl | |
| private final List | |
| private final List |
| Access | Constructor and Description |
|---|---|
| pack-priv | HttpContextImpl(String protocol, String path, HttpHandler cb, ServerImpl server)
constructor is package private. |
| Modifier and Type | Method and Description |
|---|---|
| public Map | getAttributes()
Implements abstract com. returns a mutable Map, which can be used to pass configuration and other data to Filter modules and to the context's exchange handler. |
| public Authenticator | getAuthenticator()
Implements abstract com. Returns the currently set |
| public List | |
| public HttpHandler | Returns: the HttpHandler for this contextImplements abstract com. returns the handler for this context |
| pack-priv System. | |
| public String | Returns: this context's pathImplements abstract com. returns the path this context was created with |
| public String | |
| public HttpServer | Returns: this context's serverImplements abstract com. returns the server this context was created with |
| pack-priv ServerImpl | |
| pack-priv List | |
| public Authenticator | setAuthenticator(Authenticator auth)
Implements abstract com. Sets the |
| public void | setHandler(HttpHandler h)
Implements abstract com. Sets the handler for this context, if not already set. |
| attributes | back to summary |
|---|---|
| private final Map<String, Object> attributes | |
| authenticator | back to summary |
|---|---|
| private Authenticator authenticator | |
| authfilter | back to summary |
|---|---|
| private final AuthFilter authfilter | |
| handler | back to summary |
|---|---|
| private HttpHandler handler | |
| path | back to summary |
|---|---|
| private final String path | |
| protocol | back to summary |
|---|---|
| private final String protocol | |
| server | back to summary |
|---|---|
| private final ServerImpl server | |
| sfilters | back to summary |
|---|---|
| private final List<Filter> sfilters | |
| ufilters | back to summary |
|---|---|
| private final List<Filter> ufilters | |
| HttpContextImpl | back to summary |
|---|---|
| pack-priv HttpContextImpl(String protocol, String path, HttpHandler cb, ServerImpl server) constructor is package private. | |
| getAttributes | back to summary |
|---|---|
| public Map Implements abstract com. returns a mutable Map, which can be used to pass configuration and other data to Filter modules and to the context's exchange handler. Every attribute stored in this Map will be visible to every HttpExchange processed by this context | |
| getAuthenticator | back to summary |
|---|---|
| public Authenticator getAuthenticator() Implements abstract com. Doc from com. Returns the currently set | |
| getFilters | back to summary |
|---|---|
| public List Implements abstract com. Doc from com. Returns this context's | |
| getHandler | back to summary |
|---|---|
| public HttpHandler getHandler() Implements abstract com. returns the handler for this context
| |
| getLogger | back to summary |
|---|---|
| pack-priv System. | |
| getPath | back to summary |
|---|---|
| public String getPath() Implements abstract com. returns the path this context was created with
| |
| getProtocol | back to summary |
|---|---|
| public String getProtocol() returns the protocol this context was created with
| |
| getServer | back to summary |
|---|---|
| public HttpServer getServer() Implements abstract com. returns the server this context was created with
| |
| getServerImpl | back to summary |
|---|---|
| pack-priv ServerImpl getServerImpl() | |
| getSystemFilters | back to summary |
|---|---|
| pack-priv List | |
| setAuthenticator | back to summary |
|---|---|
| public Authenticator setAuthenticator(Authenticator auth) Implements abstract com. Doc from com. Sets the | |
| setHandler | back to summary |
|---|---|
| public void setHandler(HttpHandler h) Implements abstract com. Doc from com. Sets the handler for this context, if not already set. | |