Package org.infinispan.server.resp
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Log
protected static final int
protected io.netty.buffer.ByteBuf
protected RespRequestHandler
protected boolean
protected final BaseRespDecoder
-
Constructor Summary
ConstructorsConstructorDescriptionRespHandler
(BaseRespDecoder resumeHandler, RespRequestHandler requestHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.netty.buffer.ByteBuf
allocateBuffer
(io.netty.channel.ChannelHandlerContext ctx, int size) void
channelRead
(io.netty.channel.ChannelHandlerContext ctx, Object msg) void
channelReadComplete
(io.netty.channel.ChannelHandlerContext ctx) void
channelRegistered
(io.netty.channel.ChannelHandlerContext ctx) void
channelUnregistered
(io.netty.channel.ChannelHandlerContext ctx) void
channelWritabilityChanged
(io.netty.channel.ChannelHandlerContext ctx) void
exceptionCaught
(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) protected void
handleCommandAndArguments
(io.netty.channel.ChannelHandlerContext ctx, RespCommand command, List<byte[]> arguments) Handles the actual command request.protected void
resumeAutoRead
(io.netty.channel.ChannelHandlerContext ctx) Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
log
-
MINIMUM_BUFFER_SIZE
protected static final int MINIMUM_BUFFER_SIZE -
resumeHandler
-
requestHandler
-
outboundBuffer
protected io.netty.buffer.ByteBuf outboundBuffer -
resumeAutoReadOnWritability
protected boolean resumeAutoReadOnWritability
-
-
Constructor Details
-
RespHandler
-
-
Method Details
-
allocateBuffer
protected io.netty.buffer.ByteBuf allocateBuffer(io.netty.channel.ChannelHandlerContext ctx, int size) -
channelRegistered
- Specified by:
channelRegistered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRegistered
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
channelUnregistered
- Specified by:
channelUnregistered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelUnregistered
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
channelReadComplete
- Specified by:
channelReadComplete
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelReadComplete
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
channelWritabilityChanged
- Specified by:
channelWritabilityChanged
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelWritabilityChanged
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
resumeAutoRead
protected void resumeAutoRead(io.netty.channel.ChannelHandlerContext ctx) -
channelRead
- Specified by:
channelRead
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classio.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 commandcommand
- the actual commandarguments
- the arguments provided to the command. The list should not be retained as it is reused
-
exceptionCaught
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in classio.netty.channel.ChannelInboundHandlerAdapter
-