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
public class WebSocketFrameAggregator extends OneToOneDecoder
Handler that aggregate fragmented WebSocketFrame's. Be aware if PING/PONG/CLOSE frames are send in the middle of a fragmentedWebSocketFramethey 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 Modifier and Type Field Description private WebSocketFramecurrentFrameprivate intmaxFrameSizeprivate booleantooLongFrameFound
-
Constructor Summary
Constructors Constructor Description WebSocketFrameAggregator(int maxFrameSize)Construct a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Objectdecode(ChannelHandlerContext ctx, Channel channel, java.lang.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 Detail
-
maxFrameSize
private final int maxFrameSize
-
currentFrame
private WebSocketFrame currentFrame
-
tooLongFrameFound
private boolean tooLongFrameFound
-
-
Constructor Detail
-
WebSocketFrameAggregator
public WebSocketFrameAggregator(int maxFrameSize)
Construct a new instance- Parameters:
maxFrameSize- If the size of the aggregated frame exceeds this value, aTooLongFrameExceptionis thrown.
-
-
Method Detail
-
decode
protected java.lang.Object decode(ChannelHandlerContext ctx, Channel channel, java.lang.Object message) throws java.lang.Exception
Description copied from class:OneToOneDecoderTransforms the specified received message into another message and return the transformed message. Returnnullif the received message is supposed to be discarded.- Specified by:
decodein classOneToOneDecoder- Throws:
java.lang.Exception
-
-