public class StompSubframeAggregator extends io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
ChannelHandler that aggregates an StompHeadersSubframe
and its following StompContentSubframes into a single StompFrame.
It is useful when you don't want to take care of STOMP frames whose content is 'chunked'. Insert this
handler after StompSubframeDecoder in the ChannelPipeline:| Constructor and Description |
|---|
StompSubframeAggregator(int maxContentLength)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected StompFrame |
beginAggregation(StompHeadersSubframe start,
io.netty.buffer.ByteBuf content) |
protected boolean |
closeAfterContinueResponse(Object msg) |
protected boolean |
ignoreContentAfterContinueResponse(Object msg) |
protected boolean |
isAggregated(StompSubframe msg) |
protected boolean |
isContentLengthInvalid(StompHeadersSubframe start,
int maxContentLength) |
protected boolean |
isContentMessage(StompSubframe msg) |
protected boolean |
isLastContentMessage(StompContentSubframe msg) |
protected boolean |
isStartMessage(StompSubframe msg) |
protected Object |
newContinueResponse(StompHeadersSubframe start,
int maxContentLength,
io.netty.channel.ChannelPipeline pipeline) |
acceptInboundMessage, aggregate, channelInactive, channelReadComplete, ctx, decode, finishAggregation, handleOversizedMessage, handlerAdded, handlerRemoved, isHandlingOversizedMessage, maxContentLength, maxCumulationBufferComponents, releaseCurrentMessage, setMaxCumulationBufferComponentspublic StompSubframeAggregator(int maxContentLength)
maxContentLength - the maximum length of the aggregated content.
If the length of the aggregated content exceeds this value,
a TooLongFrameException will be raised.protected boolean isStartMessage(StompSubframe msg) throws Exception
isStartMessage in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>Exceptionprotected boolean isContentMessage(StompSubframe msg) throws Exception
isContentMessage in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>Exceptionprotected boolean isLastContentMessage(StompContentSubframe msg) throws Exception
isLastContentMessage in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>Exceptionprotected boolean isAggregated(StompSubframe msg) throws Exception
isAggregated in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>Exceptionprotected boolean isContentLengthInvalid(StompHeadersSubframe start, int maxContentLength)
isContentLengthInvalid in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>protected Object newContinueResponse(StompHeadersSubframe start, int maxContentLength, io.netty.channel.ChannelPipeline pipeline)
newContinueResponse in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>protected boolean closeAfterContinueResponse(Object msg) throws Exception
closeAfterContinueResponse in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>Exceptionprotected boolean ignoreContentAfterContinueResponse(Object msg) throws Exception
ignoreContentAfterContinueResponse in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>Exceptionprotected StompFrame beginAggregation(StompHeadersSubframe start, io.netty.buffer.ByteBuf content) throws Exception
beginAggregation in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>ExceptionCopyright © 2008–2025 The Netty Project. All rights reserved.