public class JsonRpcDecoder
extends io.netty.handler.codec.ByteToMessageDecoder
There are no JSON parsers that I am aware of that does non blocking parsing. This approach avoids having to run json parser over and over again on the entire stream waiting for input. Parser is invoked only when we know of a full JSON message in the stream.
Constructor and Description |
---|
JsonRpcDecoder(int maxFrameLength) |
Modifier and Type | Method and Description |
---|---|
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf buf,
List<Object> out) |
int |
getRecordsRead() |
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
ensureNotSharable, handlerAdded, isSharable
protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf, List<Object> out) throws IOException
decode
in class io.netty.handler.codec.ByteToMessageDecoder
IOException
public int getRecordsRead()
Copyright © 2019 OpenDaylight. All rights reserved.