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

pack-priv abstract Class DeflateDecoder

extends WebSocketExtensionDecoder
Class Inheritance
Known Direct Subclasses
io.netty5.handler.codec.http.websocketx.extensions.compression.PerFrameDeflateDecoder, io.netty5.handler.codec.http.websocketx.extensions.compression.PerMessageDeflateDecoder
Imports
io.netty5.buffer.Buffer, .CompositeBuffer, .DefaultBufferAllocators, io.netty5.util.Send, io.netty5.channel.ChannelHandlerContext, io.netty5.channel.embedded.EmbeddedChannel, io.netty5.handler.codec.CodecException, io.netty5.handler.codec.compression.ZlibCodecFactory, .ZlibWrapper, io.netty5.handler.codec.http.websocketx.BinaryWebSocketFrame, .ContinuationWebSocketFrame, .TextWebSocketFrame, .WebSocketFrame, io.netty5.handler.codec.http.websocketx.extensions.WebSocketExtensionDecoder, .WebSocketExtensionFilter, io.netty5.util.internal.SilentDispose, java.util.ArrayList, .List, .Objects, java.util.function.Supplier

Deflate implementation of a payload decompressor for io.netty5.handler.codec.http.websocketx.WebSocketFrame.

Field Summary

Modifier and TypeField and Description
private EmbeddedChannel
private final WebSocketExtensionFilter
pack-priv static final Supplier<Buffer>
pack-priv static final int
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
DeflateDecoder(boolean
true to disable context takeover.
noContext
,
WebSocketExtensionFilter
extension decoder filter.
extensionDecoderFilter
)

Constructor

Method Summary

Modifier and TypeMethod and Description
protected abstract boolean
public void
channelInactive(ChannelHandlerContext ctx)

Overrides default io.netty5.channel.ChannelHandler.channelInactive.

The Channel of the ChannelHandlerContext was registered is now inactive and reached its end of lifetime.
private void
protected final void
decode(ChannelHandlerContext ctx, WebSocketFrame
the message to decode to another one
msg
)

Overrides io.netty5.handler.codec.MessageToMessageDecoder.decode.

Decode from one message to another.
protected void
decodeAndClose(ChannelHandlerContext ctx, WebSocketFrame
the message to decode to another one
msg
)

Overrides io.netty5.handler.codec.MessageToMessageDecoder.decodeAndClose.

Decode from one message to another.
private Buffer
protected WebSocketExtensionFilter
extensionDecoderFilter()

Returns the extension decoder filter.

public void
handlerRemoved(ChannelHandlerContext ctx)

Overrides default io.netty5.channel.ChannelHandler.handlerRemoved.

Gets called after the ChannelHandler was removed from the actual context and it doesn't handle events anymore.
private static boolean
protected abstract int

Field Detail

decoderback to summary
private EmbeddedChannel decoder
extensionDecoderFilterback to summary
private final WebSocketExtensionFilter extensionDecoderFilter
FRAME_TAILback to summary
pack-priv static final Supplier<Buffer> FRAME_TAIL
FRAME_TAIL_LENGTHback to summary
pack-priv static final int FRAME_TAIL_LENGTH
noContextback to summary
private final boolean noContext

Constructor Detail

DeflateDecoderback to summary
pack-priv DeflateDecoder(boolean noContext, WebSocketExtensionFilter extensionDecoderFilter)

Constructor

Parameters
noContext:boolean

true to disable context takeover.

extensionDecoderFilter:WebSocketExtensionFilter

extension decoder filter.

Method Detail

appendFrameTailback to summary
protected abstract boolean appendFrameTail(WebSocketFrame msg)
channelInactiveback to summary
public void channelInactive(ChannelHandlerContext ctx) throws Exception

Overrides default io.netty5.channel.ChannelHandler.channelInactive.

Doc from io.netty5.channel.ChannelHandler.channelInactive.

The Channel of the ChannelHandlerContext was registered is now inactive and reached its end of lifetime.

Annotations
@Override
cleanupback to summary
private void cleanup()
decodeback to summary
protected final void decode(ChannelHandlerContext ctx, WebSocketFrame msg) throws Exception

Overrides io.netty5.handler.codec.MessageToMessageDecoder.decode.

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

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 be disposed of after this call.

Subclasses that wish to sometimes pass messages through, 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
decodeAndCloseback to summary
protected void decodeAndClose(ChannelHandlerContext ctx, WebSocketFrame msg) throws Exception

Overrides io.netty5.handler.codec.MessageToMessageDecoder.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
decompressContentback to summary
private Buffer decompressContent(ChannelHandlerContext ctx, WebSocketFrame msg)
extensionDecoderFilterback to summary
protected WebSocketExtensionFilter extensionDecoderFilter()

Returns the extension decoder filter.

handlerRemovedback to summary
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception

Overrides default io.netty5.channel.ChannelHandler.handlerRemoved.

Doc from io.netty5.channel.ChannelHandler.handlerRemoved.

Gets called after the ChannelHandler was removed from the actual context and it doesn't handle events anymore.

Annotations
@Override
isEmptyDeflateBlockback to summary
private static boolean isEmptyDeflateBlock(Buffer binaryData)
newRsvback to summary
protected abstract int newRsv(WebSocketFrame msg)