Class RntbdRequestEncoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- io.netty.handler.codec.MessageToByteEncoder<RntbdRequestRecord>
-
- com.microsoft.azure.cosmosdb.internal.directconnectivity.rntbd.RntbdRequestEncoder
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelOutboundHandler
public final class RntbdRequestEncoder extends io.netty.handler.codec.MessageToByteEncoder<RntbdRequestRecord>
-
-
Constructor Summary
Constructors Constructor Description RntbdRequestEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptOutboundMessage(Object message)Returnstrueif the given message is anRntbdRequestRecordinstance.protected voidencode(io.netty.channel.ChannelHandlerContext context, RntbdRequestRecord message, io.netty.buffer.ByteBuf out)Encode a message into aByteBuf-
Methods inherited from class io.netty.handler.codec.MessageToByteEncoder
allocateBuffer, isPreferDirect, write
-
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Method Detail
-
acceptOutboundMessage
public boolean acceptOutboundMessage(Object message)
Returnstrueif the given message is anRntbdRequestRecordinstance.If
falsethis message should be passed to the nextChannelOutboundHandlerin the pipeline.- Overrides:
acceptOutboundMessagein classio.netty.handler.codec.MessageToByteEncoder<RntbdRequestRecord>- Parameters:
message- the message to encode- Returns:
true, if the given message is an anRntbdRequestRecordinstance; otherwisefalse.
-
encode
protected void encode(io.netty.channel.ChannelHandlerContext context, RntbdRequestRecord message, io.netty.buffer.ByteBuf out)Encode a message into aByteBufThis method will be called for each message that can be written by this encoder.
- Specified by:
encodein classio.netty.handler.codec.MessageToByteEncoder<RntbdRequestRecord>- Parameters:
context- theChannelHandlerContextwhich thisMessageToByteEncoderbelongs encodemessage- the message to encodeout- theByteBufinto which the encoded message will be written
-
-