class PerFrameDeflateEncoder extends DeflateEncoder
ChannelHandler.Sharable
Constructor and Description |
---|
PerFrameDeflateEncoder(int compressionLevel,
int windowSize,
boolean noContext)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptOutboundMessage(java.lang.Object msg)
Returns
true if the given message should be handled. |
protected boolean |
removeFrameTail(WebSocketFrame msg) |
protected int |
rsv(WebSocketFrame msg) |
encode, handlerRemoved
write
bind, close, connect, deregister, disconnect, flush, read
ensureNotSharable, exceptionCaught, handlerAdded, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exceptionCaught, handlerAdded
public PerFrameDeflateEncoder(int compressionLevel, int windowSize, boolean noContext)
compressionLevel
- compression level of the compressor.windowSize
- maximum size of the window compressor buffer.noContext
- true to disable context takeover.public boolean acceptOutboundMessage(java.lang.Object msg) throws java.lang.Exception
MessageToMessageEncoder
true
if the given message should be handled. If false
it will be passed to the next
ChannelOutboundHandler
in the ChannelPipeline
.acceptOutboundMessage
in class MessageToMessageEncoder<WebSocketFrame>
java.lang.Exception
protected int rsv(WebSocketFrame msg)
rsv
in class DeflateEncoder
msg
- the current frame.protected boolean removeFrameTail(WebSocketFrame msg)
removeFrameTail
in class DeflateEncoder
msg
- the current frame.