Package com.networknt.encode
Class ResponseEncodeHandler
- java.lang.Object
-
- com.networknt.encode.ResponseEncodeHandler
-
- All Implemented Interfaces:
com.networknt.handler.LightHttpHandler
,com.networknt.handler.MiddlewareHandler
,io.undertow.server.HttpHandler
public class ResponseEncodeHandler extends Object implements com.networknt.handler.MiddlewareHandler
This is a middleware handler that you can wire in to the response chain to gzip large content body in order to speed up the delivery and reduce the bandwidth usage.- Author:
- Steve Hu
-
-
Field Summary
Fields Modifier and Type Field Description static ResponseEncodeConfig
config
-
Constructor Summary
Constructors Constructor Description ResponseEncodeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.undertow.server.HttpHandler
getNext()
void
handleRequest(io.undertow.server.HttpServerExchange exchange)
boolean
isEnabled()
void
register()
com.networknt.handler.MiddlewareHandler
setNext(io.undertow.server.HttpHandler next)
-
-
-
Field Detail
-
config
public static ResponseEncodeConfig config
-
-
Method Detail
-
getNext
public io.undertow.server.HttpHandler getNext()
- Specified by:
getNext
in interfacecom.networknt.handler.MiddlewareHandler
-
setNext
public com.networknt.handler.MiddlewareHandler setNext(io.undertow.server.HttpHandler next)
- Specified by:
setNext
in interfacecom.networknt.handler.MiddlewareHandler
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfacecom.networknt.handler.MiddlewareHandler
-
register
public void register()
- Specified by:
register
in interfacecom.networknt.handler.MiddlewareHandler
-
-