Class RntbdRequestEncoder

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelOutboundHandler

    public final class RntbdRequestEncoder
    extends io.netty.handler.codec.MessageToByteEncoder<RntbdRequestRecord>
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean acceptOutboundMessage​(Object message)
      Returns true if the given message is an RntbdRequestRecord instance.
      protected void encode​(io.netty.channel.ChannelHandlerContext context, RntbdRequestRecord message, io.netty.buffer.ByteBuf out)
      Encode a message into a ByteBuf
      • 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
      • Methods inherited from interface io.netty.channel.ChannelHandler

        exceptionCaught, handlerAdded, handlerRemoved
    • Constructor Detail

      • RntbdRequestEncoder

        public RntbdRequestEncoder()
    • Method Detail

      • acceptOutboundMessage

        public boolean acceptOutboundMessage​(Object message)
        Returns true if the given message is an RntbdRequestRecord instance.

        If false this message should be passed to the next ChannelOutboundHandler in the pipeline.

        Overrides:
        acceptOutboundMessage in class io.netty.handler.codec.MessageToByteEncoder<RntbdRequestRecord>
        Parameters:
        message - the message to encode
        Returns:
        true, if the given message is an an RntbdRequestRecord instance; otherwise false.
      • encode

        protected void encode​(io.netty.channel.ChannelHandlerContext context,
                              RntbdRequestRecord message,
                              io.netty.buffer.ByteBuf out)
        Encode a message into a ByteBuf

        This method will be called for each message that can be written by this encoder.

        Specified by:
        encode in class io.netty.handler.codec.MessageToByteEncoder<RntbdRequestRecord>
        Parameters:
        context - the ChannelHandlerContext which this MessageToByteEncoder belongs encode
        message - the message to encode
        out - the ByteBuf into which the encoded message will be written