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 long |
contentLength(StompHeadersSubframe start) |
protected boolean |
hasContentLength(StompHeadersSubframe start) |
protected boolean |
isAggregated(StompSubframe msg) |
protected boolean |
isContentMessage(StompSubframe msg) |
protected boolean |
isLastContentMessage(StompContentSubframe msg) |
protected boolean |
isStartMessage(StompSubframe msg) |
protected Object |
newContinueResponse(StompHeadersSubframe start) |
acceptInboundMessage, aggregate, channelInactive, ctx, decode, finishAggregation, handleOversizedMessage, handlerAdded, handlerRemoved, isHandlingOversizedMessage, maxContentLength, maxCumulationBufferComponents, 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 hasContentLength(StompHeadersSubframe start) throws Exception
hasContentLength in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>Exceptionprotected long contentLength(StompHeadersSubframe start) throws Exception
contentLength in class io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>Exceptionprotected Object newContinueResponse(StompHeadersSubframe start) throws Exception
newContinueResponse 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–2014 The Netty Project. All rights reserved.