public class EncodingHandler extends Object implements HttpHandler
Encoding handlers are added as delegates to this handler, with a specified server side priority.
If a request comes in with no q value then then server will pick the handler with the highest priority as the encoding to use, otherwise the q value will be used to determine the correct handler.
If no handler matches then the identity encoding is assumed. If the identity encoding has been specifically disallowed due to a q value of 0 then the handler will set the response code 406 (Not Acceptable) and return.
| Modifier and Type | Class and Description |
|---|---|
static class | EncodingHandler.Builder |
| Constructor and Description |
|---|
EncodingHandler(ContentEncodingRepository contentEncodingRepository) |
EncodingHandler(HttpHandler next, ContentEncodingRepository contentEncodingRepository) |
| Modifier and Type | Method and Description |
|---|---|
HttpHandler | getNext() |
HttpHandler | getNoEncodingHandler() |
void | handleRequest(HttpServerExchange exchange) Handle the request. |
EncodingHandler | setNext(HttpHandler next) |
EncodingHandler | setNoEncodingHandler(HttpHandler noEncodingHandler) |
public EncodingHandler(HttpHandler next, ContentEncodingRepository contentEncodingRepository)
public EncodingHandler(ContentEncodingRepository contentEncodingRepository)
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandlerhandleRequest in interface HttpHandlerexchange - the HTTP request/response exchangeExceptionpublic HttpHandler getNext()
public EncodingHandler setNext(HttpHandler next)
public HttpHandler getNoEncodingHandler()
public EncodingHandler setNoEncodingHandler(HttpHandler noEncodingHandler)
Copyright © 2020 JBoss by Red Hat. All rights reserved.