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
class PerMessageDeflateDecoder extends DeflateDecoder
Per-message implementation of deflate decompressor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Field Summary
Fields Modifier and Type Field Description private booleancompressing-
Fields inherited from class io.netty.handler.codec.http.websocketx.extensions.compression.DeflateDecoder
EMPTY_DEFLATE_BLOCK, FRAME_TAIL
-
-
Constructor Summary
Constructors Constructor Description PerMessageDeflateDecoder(boolean noContext)ConstructorPerMessageDeflateDecoder(boolean noContext, WebSocketExtensionFilter extensionDecoderFilter)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptInboundMessage(java.lang.Object msg)Returnstrueif the given message should be handled.protected booleanappendFrameTail(WebSocketFrame msg)protected voiddecode(ChannelHandlerContext ctx, WebSocketFrame msg, java.util.List<java.lang.Object> out)Decode from one message to an other.protected intnewRsv(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
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelReadComplete, 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
-
-
-
-
Constructor Detail
-
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 Detail
-
acceptInboundMessage
public boolean acceptInboundMessage(java.lang.Object msg) throws java.lang.ExceptionDescription copied from class:MessageToMessageDecoderReturnstrueif the given message should be handled. Iffalseit will be passed to the nextChannelInboundHandlerin theChannelPipeline.- Overrides:
acceptInboundMessagein classMessageToMessageDecoder<WebSocketFrame>- Throws:
java.lang.Exception
-
newRsv
protected int newRsv(WebSocketFrame msg)
- Specified by:
newRsvin classDeflateDecoder
-
appendFrameTail
protected boolean appendFrameTail(WebSocketFrame msg)
- Specified by:
appendFrameTailin classDeflateDecoder
-
decode
protected void decode(ChannelHandlerContext ctx, WebSocketFrame msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
Description copied from class:MessageToMessageDecoderDecode from one message to an other. This method will be called for each written message that can be handled by this decoder.- Overrides:
decodein classDeflateDecoder- Parameters:
ctx- theChannelHandlerContextwhich thisMessageToMessageDecoderbelongs tomsg- the message to decode to an other oneout- theListto which decoded messages should be added- Throws:
java.lang.Exception- is thrown if an error occurs
-
-