public class StompSubframeAggregator extends io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
ChannelHandler
that aggregates an StompHeadersSubframe
and its following StompContentSubframe
s 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, ctx, decode, finishAggregation, handleOversizedMessage, handlerAdded, handlerRemoved, isHandlingOversizedMessage, maxContentLength, maxCumulationBufferComponents, setMaxCumulationBufferComponents
public 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>
Exception
protected boolean isContentMessage(StompSubframe msg) throws Exception
isContentMessage
in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
Exception
protected boolean isLastContentMessage(StompContentSubframe msg) throws Exception
isLastContentMessage
in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
Exception
protected boolean isAggregated(StompSubframe msg) throws Exception
isAggregated
in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
Exception
protected 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>
Exception
protected boolean ignoreContentAfterContinueResponse(Object msg) throws Exception
ignoreContentAfterContinueResponse
in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
Exception
protected StompFrame beginAggregation(StompHeadersSubframe start, io.netty.buffer.ByteBuf content) throws Exception
beginAggregation
in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
Exception
Copyright © 2008–2017 The Netty Project. All rights reserved.