Package io.lettuce.core.protocol
Class CommandEncoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- io.netty.handler.codec.MessageToByteEncoder<Object>
-
- io.lettuce.core.protocol.CommandEncoder
-
- All Implemented Interfaces:
ChannelHandler
,ChannelOutboundHandler
public class CommandEncoder extends MessageToByteEncoder<Object>
A nettyChannelHandler
responsible for encoding commands.- Author:
- Mark Paluch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description CommandEncoder()
CommandEncoder(boolean preferDirect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ByteBuf
allocateBuffer(ChannelHandlerContext ctx, Object msg, boolean preferDirect)
protected void
encode(ChannelHandlerContext ctx, Object msg, ByteBuf out)
-
Methods inherited from class io.netty.handler.codec.MessageToByteEncoder
acceptOutboundMessage, 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.ChannelHandler
exceptionCaught, handlerAdded, handlerRemoved
-
-
-
-
Method Detail
-
allocateBuffer
protected ByteBuf allocateBuffer(ChannelHandlerContext ctx, Object msg, boolean preferDirect) throws Exception
- Overrides:
allocateBuffer
in classMessageToByteEncoder<Object>
- Throws:
Exception
-
encode
protected void encode(ChannelHandlerContext ctx, Object msg, ByteBuf out) throws Exception
- Specified by:
encode
in classMessageToByteEncoder<Object>
- Throws:
Exception
-
-