Class RntbdRequestDecoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.ByteToMessageDecoder
-
- com.microsoft.azure.cosmosdb.internal.directconnectivity.rntbd.RntbdRequestDecoder
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public final class RntbdRequestDecoder extends io.netty.handler.codec.ByteToMessageDecoder
-
-
Constructor Summary
Constructors Constructor Description RntbdRequestDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchannelRead(io.netty.channel.ChannelHandlerContext context, Object message)Prepare for decoding an @{link RntbdRequest} or fire a channel readTree event to pass the input message along.protected voiddecode(io.netty.channel.ChannelHandlerContext context, io.netty.buffer.ByteBuf in, List<Object> out)Decode the inputByteBufto anRntbdRequestinstance.-
Methods inherited from class io.netty.handler.codec.ByteToMessageDecoder
actualReadableBytes, callDecode, channelInactive, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, isSharable
-
-
-
-
Method Detail
-
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext context, Object message) throws ExceptionPrepare for decoding an @{link RntbdRequest} or fire a channel readTree event to pass the input message along.- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.handler.codec.ByteToMessageDecoder- Parameters:
context- theChannelHandlerContextwhich thisByteToMessageDecoderbelongs tomessage- the message to be decoded- Throws:
Exception- thrown if an error occurs
-
decode
protected void decode(io.netty.channel.ChannelHandlerContext context, io.netty.buffer.ByteBuf in, List<Object> out) throws IllegalStateExceptionDecode the inputByteBufto anRntbdRequestinstance.This method will be called till either the input
ByteBufhas nothing to readTree after return from this method or till nothing was readTree from the inputByteBuf.- Specified by:
decodein classio.netty.handler.codec.ByteToMessageDecoder- Parameters:
context- theChannelHandlerContextto which thisByteToMessageDecoderbelongs.in- theByteBuffrom which to read data.out- theListto which decoded messages should be added.- Throws:
IllegalStateException- thrown if an error occurs
-
-