abstract class DeflateEncoder extends WebSocketExtensionEncoder
ChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
private int |
compressionLevel |
private EmbeddedChannel |
encoder |
private boolean |
noContext |
private int |
windowSize |
| Constructor and Description |
|---|
DeflateEncoder(int compressionLevel,
int windowSize,
boolean noContext)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
private void |
cleanup() |
protected void |
encode(ChannelHandlerContext ctx,
WebSocketFrame msg,
java.util.List<java.lang.Object> out)
Encode from one message to an other.
|
void |
handlerRemoved(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
protected abstract boolean |
removeFrameTail(WebSocketFrame msg) |
protected abstract int |
rsv(WebSocketFrame msg) |
acceptOutboundMessage, writebind, close, connect, deregister, disconnect, flush, readensureNotSharable, exceptionCaught, handlerAdded, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexceptionCaught, handlerAddedprivate final int compressionLevel
private final int windowSize
private final boolean noContext
private EmbeddedChannel encoder
public DeflateEncoder(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.protected abstract int rsv(WebSocketFrame msg)
msg - the current frame.protected abstract boolean removeFrameTail(WebSocketFrame msg)
msg - the current frame.protected void encode(ChannelHandlerContext ctx, WebSocketFrame msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
MessageToMessageEncoderencode in class MessageToMessageEncoder<WebSocketFrame>ctx - 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 occurspublic void handlerRemoved(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerAdapterhandlerRemoved in interface ChannelHandlerhandlerRemoved in class ChannelHandlerAdapterjava.lang.Exceptionprivate void cleanup()