Class WebSocketFrameAggregator
java.lang.Object
org.jboss.netty.handler.codec.oneone.OneToOneDecoder
org.jboss.netty.handler.codec.http.websocketx.WebSocketFrameAggregator
- All Implemented Interfaces:
ChannelHandler
,ChannelUpstreamHandler
Handler that aggregate fragmented WebSocketFrame's.
Be aware if PING/PONG/CLOSE frames are send in the middle of a fragmented
WebSocketFrame
they will
just get forwarded to the next handler in the pipeline.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
decode
(ChannelHandlerContext ctx, Channel channel, Object message) Transforms the specified received message into another message and return the transformed message.Methods inherited from class org.jboss.netty.handler.codec.oneone.OneToOneDecoder
handleUpstream
-
Field Details
-
maxFrameSize
private final int maxFrameSize -
currentFrame
-
tooLongFrameFound
private boolean tooLongFrameFound
-
-
Constructor Details
-
WebSocketFrameAggregator
public WebSocketFrameAggregator(int maxFrameSize) Construct a new instance- Parameters:
maxFrameSize
- If the size of the aggregated frame exceeds this value, aTooLongFrameException
is thrown.
-
-
Method Details
-
decode
protected Object decode(ChannelHandlerContext ctx, Channel channel, Object message) throws Exception Description copied from class:OneToOneDecoder
Transforms the specified received message into another message and return the transformed message. Returnnull
if the received message is supposed to be discarded.- Specified by:
decode
in classOneToOneDecoder
- Throws:
Exception
-