Class EncodingHandler
java.lang.Object
io.undertow.server.handlers.encoding.EncodingHandler
- All Implemented Interfaces:
HttpHandler
Handler that serves as the basis for content encoding implementations.
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.
- Author:
- Stuart Douglas
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEncodingHandler
(ContentEncodingRepository contentEncodingRepository) EncodingHandler
(HttpHandler next, ContentEncodingRepository contentEncodingRepository) -
Method Summary
Modifier and TypeMethodDescriptiongetNext()
void
handleRequest
(HttpServerExchange exchange) Handle the request.setNext
(HttpHandler next) setNoEncodingHandler
(HttpHandler noEncodingHandler) toString()
-
Constructor Details
-
EncodingHandler
-
EncodingHandler
-
-
Method Details
-
handleRequest
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
getNext
-
setNext
-
getNoEncodingHandler
-
setNoEncodingHandler
-
toString
-