WebSocketFrame they will
just get forwarded to the next handler in the pipeline.
| Access | Constructor and Description |
|---|---|
| public | WebSocketFrameAggregator(int
If the size of the aggregated frame exceeds this value,
a maxContentLength)TooLongFrameException is thrown.Creates a new instance |
| Modifier and Type | Method and Description |
|---|---|
| protected void | aggregate(BufferAllocator allocator, WebSocketFrame aggregated, ContinuationWebSocketFrame content)
Implements abstract io. content in the passed aggregate.
|
| protected WebSocketFrame | beginAggregation(BufferAllocator allocator, WebSocketFrame start)
Implements abstract io. |
| protected boolean | closeAfterContinueResponse(Object
The return value from msg)newContinueResponse(Object, int, ChannelPipeline).Implements abstract io. newContinueResponse(Object, int, ChannelPipeline) is written.
|
| protected boolean | ignoreContentAfterContinueResponse(Object
The return value from msg)newContinueResponse(Object, int, ChannelPipeline).Implements abstract io. |
| protected boolean | isAggregated(Object msg)
Implements abstract io. true if and only if the specified message is already aggregated.
|
| protected boolean | isContentLengthInvalid(WebSocketFrame
The message which may indicate the content length. start, int The maximum allowed content length. maxContentLength)Implements abstract io. start's content length is known, and if it greater than
maxContentLength.
|
| private static boolean | |
| protected boolean | isLastContentMessage(ContinuationWebSocketFrame msg)
Implements abstract io. true if and only if the specified message is the last content message.
|
| private static boolean | |
| protected int | lengthForAggregation(WebSocketFrame
to calculate length. msg)Implements abstract io. |
| protected int | lengthForContent(ContinuationWebSocketFrame
to calculate length. msg)Implements abstract io. |
| protected Object | newContinueResponse(WebSocketFrame start, int maxContentLength, ChannelPipeline pipeline)
Implements abstract io. |
| protected ContinuationWebSocketFrame | tryContentMessage(Object msg)
Implements abstract io. msg is a content message then cast and return the same, else return
null.
|
| protected WebSocketFrame | tryStartMessage(Object msg)
Implements abstract io. msg is a start message then cast and return the same, else return
null.
|
| WebSocketFrameAggregator | back to summary |
|---|---|
| public WebSocketFrameAggregator(int maxContentLength) Creates a new instance
| |
| aggregate | back to summary |
|---|---|
| protected void aggregate(BufferAllocator allocator, WebSocketFrame aggregated, ContinuationWebSocketFrame content) throws Exception Implements abstract io. Doc from io. Aggregated the passed
| |
| beginAggregation | back to summary |
|---|---|
| protected WebSocketFrame beginAggregation(BufferAllocator allocator, WebSocketFrame start) Implements abstract io. Doc from io. Creates a new aggregated message from the specified start message.
| |
| closeAfterContinueResponse | back to summary |
|---|---|
| protected boolean closeAfterContinueResponse(Object msg) throws Exception Implements abstract io. Doc from io. Determine if the channel should be closed after the result of
| |
| ignoreContentAfterContinueResponse | back to summary |
|---|---|
| protected boolean ignoreContentAfterContinueResponse(Object msg) throws Exception Implements abstract io. Doc from io. Determine if all objects for the current request/response should be ignored or not.
Messages will stop being ignored the next time
| |
| isAggregated | back to summary |
|---|---|
| protected boolean isAggregated(Object msg) throws Exception Implements abstract io. Doc from io. Returns
| |
| isContentLengthInvalid | back to summary |
|---|---|
| protected boolean isContentLengthInvalid(WebSocketFrame start, int maxContentLength) Implements abstract io. Doc from io. Determine if the message
| |
| isContentMessage | back to summary |
|---|---|
| private static boolean isContentMessage(Object msg) | |
| isLastContentMessage | back to summary |
|---|---|
| protected boolean isLastContentMessage(ContinuationWebSocketFrame msg) Implements abstract io. Doc from io. Returns return msg instanceof MyLastContentMessage;or with instanceof and boolean field check:
return msg instanceof MyContentMessage && msg.isLastFragment();
| |
| isStartMessage | back to summary |
|---|---|
| private static boolean isStartMessage(Object msg) | |
| lengthForAggregation | back to summary |
|---|---|
| protected int lengthForAggregation(WebSocketFrame msg) Implements abstract io. Doc from io. Returns the length in bytes of the passed message.
| |
| lengthForContent | back to summary |
|---|---|
| protected int lengthForContent(ContinuationWebSocketFrame msg) Implements abstract io. Doc from io. Returns the length in bytes of the passed message.
| |
| newContinueResponse | back to summary |
|---|---|
| protected Object newContinueResponse(WebSocketFrame start, int maxContentLength, ChannelPipeline pipeline) Implements abstract io. Doc from io. Returns the 'continue response' for the specified start message if necessary. For example, this method is useful to handle an HTTP 100-continue header. | |
| tryContentMessage | back to summary |
|---|---|
| protected ContinuationWebSocketFrame tryContentMessage(Object msg) Implements abstract io. Doc from io. If the passed
| |
| tryStartMessage | back to summary |
|---|---|
| protected WebSocketFrame tryStartMessage(Object msg) Implements abstract io. Doc from io. If the passed
| |