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 Logprotected static final Logprotected static final intprotected io.netty.buffer.ByteBufprotected RespRequestHandlerprotected booleanprotected final BaseRespDecoder -
Constructor Summary
ConstructorsConstructorDescriptionRespHandler(BaseRespDecoder resumeHandler, RespRequestHandler requestHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.netty.buffer.ByteBufallocateBuffer(io.netty.channel.ChannelHandlerContext ctx, int size) voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) voidchannelReadComplete(io.netty.channel.ChannelHandlerContext ctx) voidchannelRegistered(io.netty.channel.ChannelHandlerContext ctx) voidchannelUnregistered(io.netty.channel.ChannelHandlerContext ctx) voidchannelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx) voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) protected voidhandleCommandAndArguments(io.netty.channel.ChannelHandlerContext ctx, RespCommand command, List<byte[]> arguments) Handles the actual command request.protected voidresumeAutoRead(io.netty.channel.ChannelHandlerContext ctx) Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
log
-
coreLog
-
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
-
channelUnregistered
-
channelReadComplete
-
channelWritabilityChanged
- Specified by:
channelWritabilityChangedin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelWritabilityChangedin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
resumeAutoRead
protected void resumeAutoRead(io.netty.channel.ChannelHandlerContext ctx) -
channelRead
- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin 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:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
-