abstract class DeflateDecoder extends WebSocketExtensionDecoder
ChannelHandler.Sharable
Modifier and Type | Field and Description |
---|---|
private EmbeddedChannel |
decoder |
(package private) static byte[] |
FRAME_TAIL |
private boolean |
noContext |
Constructor and Description |
---|
DeflateDecoder(boolean noContext)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
appendFrameTail(WebSocketFrame msg) |
void |
channelInactive(ChannelHandlerContext ctx)
Calls
ChannelHandlerContext.fireChannelInactive() to forward
to the next ChannelInboundHandler in the ChannelPipeline . |
private void |
cleanup() |
protected void |
decode(ChannelHandlerContext ctx,
WebSocketFrame msg,
java.util.List<java.lang.Object> out)
Decode from one message to an other.
|
void |
handlerRemoved(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
protected abstract int |
newRsv(WebSocketFrame msg) |
acceptInboundMessage, channelRead
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
ensureNotSharable, handlerAdded, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handlerAdded
static final byte[] FRAME_TAIL
private final boolean noContext
private EmbeddedChannel decoder
public DeflateDecoder(boolean noContext)
noContext
- true to disable context takeover.protected abstract boolean appendFrameTail(WebSocketFrame msg)
protected abstract int newRsv(WebSocketFrame msg)
protected void decode(ChannelHandlerContext ctx, WebSocketFrame msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
MessageToMessageDecoder
decode
in class MessageToMessageDecoder<WebSocketFrame>
ctx
- the ChannelHandlerContext
which this MessageToMessageDecoder
belongs tomsg
- the message to decode to an other oneout
- the List
to which decoded messages should be addedjava.lang.Exception
- is thrown if an error occurspublic void handlerRemoved(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelHandlerAdapter
handlerRemoved
in interface ChannelHandler
handlerRemoved
in class ChannelHandlerAdapter
java.lang.Exception
public void channelInactive(ChannelHandlerContext ctx) throws java.lang.Exception
ChannelInboundHandlerAdapter
ChannelHandlerContext.fireChannelInactive()
to forward
to the next ChannelInboundHandler
in the ChannelPipeline
.
Sub-classes may override this method to change behavior.channelInactive
in interface ChannelInboundHandler
channelInactive
in class ChannelInboundHandlerAdapter
java.lang.Exception
private void cleanup()