@Internal public class SmartHttpContentCompressor extends io.netty.handler.codec.http.HttpContentCompressor
HttpContentCompressor that skips encoding if the content type is not compressible or if
the content is too small.| Modifier and Type | Method and Description |
|---|---|
protected io.netty.handler.codec.http.HttpContentEncoder.Result |
beginEncode(io.netty.handler.codec.http.HttpResponse headers,
String acceptEncoding) |
protected void |
encode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpObject msg,
List<Object> out) |
boolean |
shouldSkip(io.netty.handler.codec.http.HttpResponse response)
Determines if encoding should occur based on the response.
|
determineEncoding, determineWrapper, handlerAddedacceptOutboundMessage, channelInactive, decode, handlerRemovedacceptInboundMessage, channelRead, writebind, close, connect, deregister, disconnect, flush, readchannelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredpublic boolean shouldSkip(io.netty.handler.codec.http.HttpResponse response)
response - The responseprotected void encode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpObject msg,
List<Object> out)
throws Exception
encode in class io.netty.handler.codec.http.HttpContentEncoderException