Class EncodingHandler
- java.lang.Object
-
- io.undertow.server.handlers.encoding.EncodingHandler
-
- All Implemented Interfaces:
HttpHandler
public class EncodingHandler extends Object implements 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 Modifier and Type Class Description static class
EncodingHandler.Builder
-
Constructor Summary
Constructors Constructor Description EncodingHandler(ContentEncodingRepository contentEncodingRepository)
EncodingHandler(HttpHandler next, ContentEncodingRepository contentEncodingRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpHandler
getNext()
HttpHandler
getNoEncodingHandler()
void
handleRequest(HttpServerExchange exchange)
Handle the request.EncodingHandler
setNext(HttpHandler next)
EncodingHandler
setNoEncodingHandler(HttpHandler noEncodingHandler)
String
toString()
-
-
-
Constructor Detail
-
EncodingHandler
public EncodingHandler(HttpHandler next, ContentEncodingRepository contentEncodingRepository)
-
EncodingHandler
public EncodingHandler(ContentEncodingRepository contentEncodingRepository)
-
-
Method Detail
-
handleRequest
public void handleRequest(HttpServerExchange exchange) throws Exception
Description copied from interface:HttpHandler
Handle the request.- Specified by:
handleRequest
in interfaceHttpHandler
- Parameters:
exchange
- the HTTP request/response exchange- Throws:
Exception
-
getNext
public HttpHandler getNext()
-
setNext
public EncodingHandler setNext(HttpHandler next)
-
getNoEncodingHandler
public HttpHandler getNoEncodingHandler()
-
setNoEncodingHandler
public EncodingHandler setNoEncodingHandler(HttpHandler noEncodingHandler)
-
-