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

pack-priv abstract Class DeflateDecoder

extends WebSocketExtensionDecoder
Class Inheritance
Known Direct Subclasses
io.netty.handler.codec.http.websocketx.extensions.compression.PerFrameDeflateDecoder, io.netty.handler.codec.http.websocketx.extensions.compression.PerMessageDeflateDecoder
Imports
io.netty.buffer.ByteBuf, .CompositeByteBuf, .Unpooled, io.netty.channel.ChannelHandlerContext, io.netty.channel.embedded.EmbeddedChannel, io.netty.handler.codec.CodecException, io.netty.handler.codec.compression.ZlibCodecFactory, .ZlibWrapper, io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame, .ContinuationWebSocketFrame, .TextWebSocketFrame, .WebSocketFrame, io.netty.handler.codec.http.websocketx.extensions.WebSocketExtensionDecoder, .WebSocketExtensionFilter, java.util.List

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

Field Summary

Modifier and TypeField and Description
private EmbeddedChannel
pack-priv static final ByteBuf
private final WebSocketExtensionFilter
pack-priv static final ByteBuf
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
private void
protected void
decode(ChannelHandlerContext ctx, WebSocketFrame
the message to decode to an other one
msg
,
List<Object>
the List to which decoded messages should be added
out
)

Implements abstract io.netty.handler.codec.MessageToMessageDecoder.decode.

Decode from one message to an other.
private ByteBuf
protected WebSocketExtensionFilter
extensionDecoderFilter()

Returns the extension decoder filter.

public void
handlerRemoved(ChannelHandlerContext ctx)

Overrides io.netty.channel.ChannelHandlerAdapter.handlerRemoved.

Implements io.netty.channel.ChannelHandler.handlerRemoved.

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

Field Detail

decoderback to summary
private EmbeddedChannel decoder
EMPTY_DEFLATE_BLOCKback to summary
pack-priv static final ByteBuf EMPTY_DEFLATE_BLOCK
extensionDecoderFilterback to summary
private final WebSocketExtensionFilter extensionDecoderFilter
FRAME_TAILback to summary
pack-priv static final ByteBuf FRAME_TAIL
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 io.netty.channel.ChannelInboundHandlerAdapter.channelInactive.

Implements io.netty.channel.ChannelInboundHandler.channelInactive.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelInactive.

Calls ChannelHandlerContext#fireChannelInactive() to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
cleanupback to summary
private void cleanup()
decodeback to summary
protected void decode(ChannelHandlerContext ctx, WebSocketFrame msg, List<Object> out) throws Exception

Implements abstract io.netty.handler.codec.MessageToMessageDecoder.decode.

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

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

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this MessageToMessageDecoder belongs to

msg:WebSocketFrame

the message to decode to an other one

out:List<Object>

the List to which decoded messages should be added

Annotations
@Override
Exceptions
Exception:
is thrown if an error occurs
decompressContentback to summary
private ByteBuf 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 io.netty.channel.ChannelHandlerAdapter.handlerRemoved.

Implements io.netty.channel.ChannelHandler.handlerRemoved.

Doc from io.netty.channel.ChannelHandler.handlerRemoved.

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

Annotations
@Override
newRsvback to summary
protected abstract int newRsv(WebSocketFrame msg)