Class Resp3AuthHandler

Direct Known Subclasses:
Resp3Handler

public class Resp3AuthHandler extends CacheRespRequestHandler
  • Constructor Details

    • Resp3AuthHandler

      public Resp3AuthHandler(RespServer server)
    • Resp3AuthHandler

      protected Resp3AuthHandler(RespServer server, AdvancedCache<byte[],byte[]> cache)
  • Method Details

    • actualHandleRequest

      protected CompletionStage<RespRequestHandler> actualHandleRequest(io.netty.channel.ChannelHandlerContext ctx, RespCommand command, List<byte[]> arguments)
      Description copied from class: RespRequestHandler
      Handles the RESP request returning a stage that when complete notifies the command has completed as well as providing the request handler for subsequent commands.

      Implementations should never use the ByteBufAllocator in the context. Instead, they should use RespRequestHandler.writer to retrieve a ResponseWriter This ByteBuffer should only have bytes written to it adding up to the size requested. The ByteBuffer itself should never be written to the context or channel and flush should also never be invoked. Failure to do so may cause mis-ordering or responses as requests support pipelining and a ByteBuf may not be sent down stream until later in the pipeline.

      Overrides:
      actualHandleRequest in class RespRequestHandler
      Parameters:
      ctx - Netty context pipeline for this request
      command - The command type
      arguments - The remaining arguments to the command
      Returns:
      stage that when complete returns the new handler to instate. This stage must be completed on the event loop
    • performAuth

      public CompletionStage<Boolean> performAuth(io.netty.channel.ChannelHandlerContext ctx, byte[] username, byte[] password)
    • performAuth

      public CompletionStage<Boolean> performAuth(io.netty.channel.ChannelHandlerContext ctx)
    • isAuthorized

      public boolean isAuthorized()
    • canUseCertAuth

      public boolean canUseCertAuth()