Class RespHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.infinispan.server.resp.RespHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class RespHandler extends io.netty.channel.ChannelInboundHandlerAdapter
  • Field Details

    • log

      protected static final Log log
    • MINIMUM_BUFFER_SIZE

      protected static final int MINIMUM_BUFFER_SIZE
    • resumeHandler

      protected final BaseRespDecoder resumeHandler
    • requestHandler

      protected RespRequestHandler requestHandler
    • outboundBuffer

      protected io.netty.buffer.ByteBuf outboundBuffer
    • resumeAutoReadOnWritability

      protected boolean resumeAutoReadOnWritability
  • Constructor Details

  • Method Details

    • allocateBuffer

      protected io.netty.buffer.ByteBuf allocateBuffer(io.netty.channel.ChannelHandlerContext ctx, int size)
    • channelRegistered

      public void channelRegistered(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelRegistered in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRegistered in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • channelUnregistered

      public void channelUnregistered(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelUnregistered in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelUnregistered in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • channelReadComplete

      public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelReadComplete in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • channelWritabilityChanged

      public void channelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelWritabilityChanged in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelWritabilityChanged in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • resumeAutoRead

      protected void resumeAutoRead(io.netty.channel.ChannelHandlerContext ctx)
    • channelRead

      public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
      Specified by:
      channelRead in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
    • handleCommandAndArguments

      protected void handleCommandAndArguments(io.netty.channel.ChannelHandlerContext ctx, RespCommand command, List<byte[]> arguments)
      Handles the actual command request. This entails passing the command to the request handler and if the request is completed the decoder may parse more commands.
      Parameters:
      ctx - channel context in use for this command
      command - the actual command
      arguments - the arguments provided to the command. The list should not be retained as it is reused
    • exceptionCaught

      public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelHandler
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      exceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter