Top Description Constructors Methods
reactor.netty.http.server

pack-priv final Class SimpleCompressionHandler

extends HttpContentCompressor
Class Inheritance
Imports
io.netty.buffer.ByteBuf, io.netty.channel.ChannelHandlerContext, .ChannelPromise, io.netty.handler.codec.DecoderException, io.netty.handler.codec.compression.CompressionOptions, io.netty.handler.codec.http.DefaultHttpContent, .DefaultHttpRequest, .FullHttpRequest, .HttpContentCompressor, .HttpRequest, io.netty.util.ReferenceCountUtil, java.util.ArrayList, .List

HttpContentCompressor to enable on-demand compression.
Author
Stephane Maldini

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public void
write(ChannelHandlerContext
the ChannelHandlerContext for which the write operation is made
ctx
,
Object
the message to write
msg
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Overrides io.netty.handler.codec.MessageToMessageCodec.write.

Implements io.netty.channel.ChannelOutboundHandler.write.

Calls ChannelHandlerContext#write(Object, ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline.
Inherited from io.netty.handler.codec.http.HttpContentCompressor:
beginEncodedetermineEncodingdetermineWrapperhandlerAdded

Constructor Detail

SimpleCompressionHandlerback to summary
pack-priv SimpleCompressionHandler()

Method Detail

decodeback to summary
pack-priv void decode(ChannelHandlerContext ctx, HttpRequest msg)
writeback to summary
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception

Overrides io.netty.handler.codec.MessageToMessageCodec.write.

Implements io.netty.channel.ChannelOutboundHandler.write.

Doc from io.netty.channel.ChannelDuplexHandler.write.

Calls ChannelHandlerContext#write(Object, ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Parameters
ctx:ChannelHandlerContext

Doc from io.netty.channel.ChannelOutboundHandler.write.

the ChannelHandlerContext for which the write operation is made

msg:Object

Doc from io.netty.channel.ChannelOutboundHandler.write.

the message to write

promise:ChannelPromise

Doc from io.netty.channel.ChannelOutboundHandler.write.

the ChannelPromise to notify once the operation completes

Annotations
@Override
Exceptions
Exception:

Doc from io.netty.channel.ChannelOutboundHandler.write.

thrown if an error occurs