class PerMessageDeflateEncoder extends DeflateEncoder
ChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
private boolean |
compressing |
| Constructor and Description |
|---|
PerMessageDeflateEncoder(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 void |
encode(ChannelHandlerContext ctx,
WebSocketFrame msg,
java.util.List<java.lang.Object> out)
Encode from one message to an other.
|
protected boolean |
removeFrameTail(WebSocketFrame msg) |
protected int |
rsv(WebSocketFrame msg) |
handlerRemovedwritebind, close, connect, deregister, disconnect, flush, readensureNotSharable, exceptionCaught, handlerAdded, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexceptionCaught, handlerAddedpublic PerMessageDeflateEncoder(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
MessageToMessageEncodertrue 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.Exceptionprotected int rsv(WebSocketFrame msg)
rsv in class DeflateEncodermsg - the current frame.protected boolean removeFrameTail(WebSocketFrame msg)
removeFrameTail in class DeflateEncodermsg - the current frame.protected void encode(ChannelHandlerContext ctx, WebSocketFrame msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
MessageToMessageEncoderencode in class DeflateEncoderctx - the ChannelHandlerContext which this MessageToMessageEncoder belongs tomsg - the message to encode to an other oneout - the List into which the encoded msg should be added
needs to do some kind of aggregationjava.lang.Exception - is thrown if an error occurs