@UnstableApi public final class RedisBulkStringAggregator extends io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>
ChannelHandler that aggregates an BulkStringHeaderRedisMessage
and its following BulkStringRedisContents into a single FullBulkStringRedisMessage
with no following BulkStringRedisContents. It is useful when you don't want to take
care of RedisMessages whose transfer encoding is 'chunked'. Insert this
handler after RedisDecoder in the ChannelPipeline:
Be aware that you need to have theChannelPipelinep = ...; ... p.addLast("encoder", newRedisEncoder()); p.addLast("decoder", newRedisDecoder()); p.addLast("aggregator", newRedisBulkStringAggregator()); ... p.addLast("handler", new HttpRequestHandler());
RedisEncoder before the RedisBulkStringAggregator
in the ChannelPipeline.| Constructor and Description |
|---|
RedisBulkStringAggregator()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected FullBulkStringRedisMessage |
beginAggregation(BulkStringHeaderRedisMessage start,
io.netty.buffer.ByteBuf content) |
protected boolean |
closeAfterContinueResponse(Object msg) |
protected boolean |
ignoreContentAfterContinueResponse(Object msg) |
protected boolean |
isAggregated(RedisMessage msg) |
protected boolean |
isContentLengthInvalid(BulkStringHeaderRedisMessage start,
int maxContentLength) |
protected boolean |
isContentMessage(RedisMessage msg) |
protected boolean |
isLastContentMessage(BulkStringRedisContent msg) |
protected boolean |
isStartMessage(RedisMessage msg) |
protected Object |
newContinueResponse(BulkStringHeaderRedisMessage start,
int maxContentLength,
io.netty.channel.ChannelPipeline pipeline) |
acceptInboundMessage, aggregate, channelInactive, channelReadComplete, ctx, decode, finishAggregation, handleOversizedMessage, handlerAdded, handlerRemoved, isHandlingOversizedMessage, maxContentLength, maxCumulationBufferComponents, releaseCurrentMessage, setMaxCumulationBufferComponentspublic RedisBulkStringAggregator()
protected boolean isStartMessage(RedisMessage msg) throws Exception
isStartMessage in class io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>Exceptionprotected boolean isContentMessage(RedisMessage msg) throws Exception
isContentMessage in class io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>Exceptionprotected boolean isLastContentMessage(BulkStringRedisContent msg) throws Exception
isLastContentMessage in class io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>Exceptionprotected boolean isAggregated(RedisMessage msg) throws Exception
isAggregated in class io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>Exceptionprotected boolean isContentLengthInvalid(BulkStringHeaderRedisMessage start, int maxContentLength) throws Exception
isContentLengthInvalid in class io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>Exceptionprotected Object newContinueResponse(BulkStringHeaderRedisMessage start, int maxContentLength, io.netty.channel.ChannelPipeline pipeline) throws Exception
newContinueResponse in class io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>Exceptionprotected boolean closeAfterContinueResponse(Object msg) throws Exception
closeAfterContinueResponse in class io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>Exceptionprotected boolean ignoreContentAfterContinueResponse(Object msg) throws Exception
ignoreContentAfterContinueResponse in class io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>Exceptionprotected FullBulkStringRedisMessage beginAggregation(BulkStringHeaderRedisMessage start, io.netty.buffer.ByteBuf content) throws Exception
beginAggregation in class io.netty.handler.codec.MessageAggregator<RedisMessage,BulkStringHeaderRedisMessage,BulkStringRedisContent,FullBulkStringRedisMessage>ExceptionCopyright © 2008–2025 The Netty Project. All rights reserved.