Class PerFrameDeflateEncoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- io.netty.handler.codec.MessageToMessageEncoder<WebSocketFrame>
-
- io.netty.handler.codec.http.websocketx.extensions.WebSocketExtensionEncoder
-
- io.netty.handler.codec.http.websocketx.extensions.compression.DeflateEncoder
-
- io.netty.handler.codec.http.websocketx.extensions.compression.PerFrameDeflateEncoder
-
- All Implemented Interfaces:
ChannelHandler,ChannelOutboundHandler
class PerFrameDeflateEncoder extends DeflateEncoder
Per-frame implementation of deflate compressor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description PerFrameDeflateEncoder(int compressionLevel, int windowSize, boolean noContext)ConstructorPerFrameDeflateEncoder(int compressionLevel, int windowSize, boolean noContext, WebSocketExtensionFilter extensionEncoderFilter)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptOutboundMessage(java.lang.Object msg)Returnstrueif the given message should be handled.protected booleanremoveFrameTail(WebSocketFrame msg)protected intrsv(WebSocketFrame msg)-
Methods inherited from class io.netty.handler.codec.http.websocketx.extensions.compression.DeflateEncoder
encode, extensionEncoderFilter, handlerRemoved
-
Methods inherited from class io.netty.handler.codec.MessageToMessageEncoder
write
-
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, 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
exceptionCaught, handlerAdded
-
-
-
-
Constructor Detail
-
PerFrameDeflateEncoder
PerFrameDeflateEncoder(int compressionLevel, int windowSize, boolean noContext)Constructor- Parameters:
compressionLevel- compression level of the compressor.windowSize- maximum size of the window compressor buffer.noContext- true to disable context takeover.
-
PerFrameDeflateEncoder
PerFrameDeflateEncoder(int compressionLevel, int windowSize, boolean noContext, WebSocketExtensionFilter extensionEncoderFilter)Constructor- Parameters:
compressionLevel- compression level of the compressor.windowSize- maximum size of the window compressor buffer.noContext- true to disable context takeover.extensionEncoderFilter- extension encoder filter for per frame deflate encoder.
-
-
Method Detail
-
acceptOutboundMessage
public boolean acceptOutboundMessage(java.lang.Object msg) throws java.lang.ExceptionDescription copied from class:MessageToMessageEncoderReturnstrueif the given message should be handled. Iffalseit will be passed to the nextChannelOutboundHandlerin theChannelPipeline.- Overrides:
acceptOutboundMessagein classMessageToMessageEncoder<WebSocketFrame>- Throws:
java.lang.Exception
-
rsv
protected int rsv(WebSocketFrame msg)
- Specified by:
rsvin classDeflateEncoder- Parameters:
msg- the current frame.- Returns:
- the rsv bits to set in the compressed frame.
-
removeFrameTail
protected boolean removeFrameTail(WebSocketFrame msg)
- Specified by:
removeFrameTailin classDeflateEncoder- Parameters:
msg- the current frame.- Returns:
- true if compressed payload tail needs to be removed.
-
-