Class PerMessageDeflateDecoder
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.MessageToMessageDecoder<WebSocketFrame>
io.netty.handler.codec.http.websocketx.extensions.WebSocketExtensionDecoder
io.netty.handler.codec.http.websocketx.extensions.compression.DeflateDecoder
io.netty.handler.codec.http.websocketx.extensions.compression.PerMessageDeflateDecoder
- All Implemented Interfaces:
ChannelHandler
,ChannelInboundHandler
Per-message implementation of deflate decompressor.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
Field Summary
FieldsFields inherited from class io.netty.handler.codec.http.websocketx.extensions.compression.DeflateDecoder
EMPTY_DEFLATE_BLOCK, FRAME_TAIL
-
Constructor Summary
ConstructorsConstructorDescriptionPerMessageDeflateDecoder
(boolean noContext) ConstructorPerMessageDeflateDecoder
(boolean noContext, WebSocketExtensionFilter extensionDecoderFilter) Constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if the given message should be handled.protected boolean
protected void
decode
(ChannelHandlerContext ctx, WebSocketFrame msg, List<Object> out) Decode from one message to an other.protected int
newRsv
(WebSocketFrame msg) Methods inherited from class io.netty.handler.codec.http.websocketx.extensions.compression.DeflateDecoder
channelInactive, extensionDecoderFilter, handlerRemoved
Methods inherited from class io.netty.handler.codec.MessageToMessageDecoder
channelRead, channelReadComplete
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded
-
Field Details
-
compressing
private boolean compressing
-
-
Constructor Details
-
PerMessageDeflateDecoder
PerMessageDeflateDecoder(boolean noContext) Constructor- Parameters:
noContext
- true to disable context takeover.
-
PerMessageDeflateDecoder
PerMessageDeflateDecoder(boolean noContext, WebSocketExtensionFilter extensionDecoderFilter) Constructor- Parameters:
noContext
- true to disable context takeover.extensionDecoderFilter
- extension decoder for per message deflate decoder.
-
-
Method Details
-
acceptInboundMessage
Description copied from class:MessageToMessageDecoder
Returnstrue
if the given message should be handled. Iffalse
it will be passed to the nextChannelInboundHandler
in theChannelPipeline
.- Overrides:
acceptInboundMessage
in classMessageToMessageDecoder<WebSocketFrame>
- Throws:
Exception
-
newRsv
- Specified by:
newRsv
in classDeflateDecoder
-
appendFrameTail
- Specified by:
appendFrameTail
in classDeflateDecoder
-
decode
protected void decode(ChannelHandlerContext ctx, WebSocketFrame msg, List<Object> out) throws Exception Description copied from class:MessageToMessageDecoder
Decode from one message to an other. This method will be called for each written message that can be handled by this decoder.- Overrides:
decode
in classDeflateDecoder
- Parameters:
ctx
- theChannelHandlerContext
which thisMessageToMessageDecoder
belongs tomsg
- the message to decode to an other oneout
- theList
to which decoded messages should be added- Throws:
Exception
- is thrown if an error occurs
-