Package io.netty.handler.codec.stomp
Class StompSubframeAggregator
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.MessageToMessageDecoder<I>
-
- io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
-
- io.netty.handler.codec.stomp.StompSubframeAggregator
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class StompSubframeAggregator extends io.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
AChannelHandlerthat aggregates anStompHeadersSubframeand its followingStompContentSubframes into a singleStompFrame. It is useful when you don't want to take care of STOMP frames whose content is 'chunked'. Insert this handler afterStompSubframeDecoderin theChannelPipeline:
-
-
Constructor Summary
Constructors Constructor Description StompSubframeAggregator(int maxContentLength)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StompFramebeginAggregation(StompHeadersSubframe start, io.netty.buffer.ByteBuf content)protected booleancloseAfterContinueResponse(Object msg)protected booleanignoreContentAfterContinueResponse(Object msg)protected booleanisAggregated(StompSubframe msg)protected booleanisContentLengthInvalid(StompHeadersSubframe start, int maxContentLength)protected booleanisContentMessage(StompSubframe msg)protected booleanisLastContentMessage(StompContentSubframe msg)protected booleanisStartMessage(StompSubframe msg)protected ObjectnewContinueResponse(StompHeadersSubframe start, int maxContentLength, io.netty.channel.ChannelPipeline pipeline)-
Methods inherited from class io.netty.handler.codec.MessageAggregator
acceptInboundMessage, aggregate, channelInactive, channelReadComplete, ctx, decode, finishAggregation, handleOversizedMessage, handlerAdded, handlerRemoved, isHandlingOversizedMessage, maxContentLength, maxCumulationBufferComponents, releaseCurrentMessage, setMaxCumulationBufferComponents
-
-
-
-
Method Detail
-
isStartMessage
protected boolean isStartMessage(StompSubframe msg) throws Exception
- Specified by:
isStartMessagein classio.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>- Throws:
Exception
-
isContentMessage
protected boolean isContentMessage(StompSubframe msg) throws Exception
- Specified by:
isContentMessagein classio.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>- Throws:
Exception
-
isLastContentMessage
protected boolean isLastContentMessage(StompContentSubframe msg) throws Exception
- Specified by:
isLastContentMessagein classio.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>- Throws:
Exception
-
isAggregated
protected boolean isAggregated(StompSubframe msg) throws Exception
- Specified by:
isAggregatedin classio.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>- Throws:
Exception
-
isContentLengthInvalid
protected boolean isContentLengthInvalid(StompHeadersSubframe start, int maxContentLength)
- Specified by:
isContentLengthInvalidin classio.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
-
newContinueResponse
protected Object newContinueResponse(StompHeadersSubframe start, int maxContentLength, io.netty.channel.ChannelPipeline pipeline)
- Specified by:
newContinueResponsein classio.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>
-
closeAfterContinueResponse
protected boolean closeAfterContinueResponse(Object msg) throws Exception
- Specified by:
closeAfterContinueResponsein classio.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>- Throws:
Exception
-
ignoreContentAfterContinueResponse
protected boolean ignoreContentAfterContinueResponse(Object msg) throws Exception
- Specified by:
ignoreContentAfterContinueResponsein classio.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>- Throws:
Exception
-
beginAggregation
protected StompFrame beginAggregation(StompHeadersSubframe start, io.netty.buffer.ByteBuf content) throws Exception
- Specified by:
beginAggregationin classio.netty.handler.codec.MessageAggregator<StompSubframe,StompHeadersSubframe,StompContentSubframe,StompFrame>- Throws:
Exception
-
-