Top Description Fields Constructors Methods
io.netty5.handler.codec.http.websocketx.extensions.compression

pack-priv Class PerMessageDeflateDecoder

extends DeflateDecoder
Class Inheritance
Imports
io.netty5.channel.ChannelHandlerContext, io.netty5.handler.codec.http.websocketx.BinaryWebSocketFrame, .ContinuationWebSocketFrame, .TextWebSocketFrame, .WebSocketFrame, io.netty5.handler.codec.http.websocketx.extensions.WebSocketExtension, .WebSocketExtensionFilter

Per-message implementation of deflate decompressor.

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from io.netty5.handler.codec.http.websocketx.extensions.compression.DeflateDecoder:
FRAME_TAILFRAME_TAIL_LENGTH

Constructor Summary

AccessConstructor and Description
pack-priv
PerMessageDeflateDecoder(boolean
true to disable context takeover.
noContext
)

Constructor

pack-priv
PerMessageDeflateDecoder(boolean
true to disable context takeover.
noContext
,
WebSocketExtensionFilter
extension decoder for per message deflate decoder.
extensionDecoderFilter
)

Constructor

Method Summary

Modifier and TypeMethod and Description
public boolean
acceptInboundMessage(Object msg)

Overrides io.netty5.handler.codec.MessageToMessageDecoder.acceptInboundMessage.

Returns true if the given message should be handled.
protected boolean
protected void
protected int
Inherited from io.netty5.handler.codec.http.websocketx.extensions.compression.DeflateDecoder:
channelInactivedecodeextensionDecoderFilterhandlerRemoved

Field Detail

compressingback to summary
private boolean compressing

Constructor Detail

PerMessageDeflateDecoderback to summary
pack-priv PerMessageDeflateDecoder(boolean noContext)

Constructor

Parameters
noContext:boolean

true to disable context takeover.

PerMessageDeflateDecoderback to summary
pack-priv PerMessageDeflateDecoder(boolean noContext, WebSocketExtensionFilter extensionDecoderFilter)

Constructor

Parameters
noContext:boolean

true to disable context takeover.

extensionDecoderFilter:WebSocketExtensionFilter

extension decoder for per message deflate decoder.

Method Detail

acceptInboundMessageback to summary
public boolean acceptInboundMessage(Object msg) throws Exception

Overrides io.netty5.handler.codec.MessageToMessageDecoder.acceptInboundMessage.

Doc from io.netty5.handler.codec.MessageToMessageDecoder.acceptInboundMessage.

Returns true if the given message should be handled. If false it will be passed to the next ChannelHandler in the ChannelPipeline.

Annotations
@Override
appendFrameTailback to summary
protected boolean appendFrameTail(WebSocketFrame msg)

Implements abstract io.netty5.handler.codec.http.websocketx.extensions.compression.DeflateDecoder.appendFrameTail.

Annotations
@Override
decodeAndCloseback to summary
protected void decodeAndClose(ChannelHandlerContext ctx, WebSocketFrame msg) throws Exception

Overrides io.netty5.handler.codec.http.websocketx.extensions.compression.DeflateDecoder.decodeAndClose.

Doc from io.netty5.handler.codec.MessageToMessageDecoder.decodeAndClose.

Decode from one message to another. This method will be called for each written message that can be handled by this decoder.

The message will not be automatically disposed of after this call. Instead, the responsibility of ensuring that messages are disposed of falls upon the implementor of this method.

Subclasses that wish to have incoming messages automatically disposed of should instead override the decodeAndClose(ChannelHandlerContext, Object) method.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this MessageToMessageDecoder belongs to

msg:WebSocketFrame

the message to decode to another one

Annotations
@Override
Exceptions
Exception:
is thrown if an error occurs
newRsvback to summary
protected int newRsv(WebSocketFrame msg)

Implements abstract io.netty5.handler.codec.http.websocketx.extensions.compression.DeflateDecoder.newRsv.

Annotations
@Override