From 5551403b2a957429636b63ac88c4f243058d6076 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Thu, 17 Apr 2014 15:42:47 +0200 Subject: [PATCH] [#2401] Improve documentation of HttpObjectAggregator Motivation: Make it more clear what the output of HttpObjectAggregator is and that it need to come after the encoder in the pipeline. Modifications: Change javadocs to make things more clear. Result: Better docs --- .../io/netty/handler/codec/http/HttpObjectAggregator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectAggregator.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectAggregator.java index ba8a3d3c99..43d87dabc0 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectAggregator.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectAggregator.java @@ -32,8 +32,9 @@ import static io.netty.handler.codec.http.HttpHeaders.*; /** * A {@link ChannelHandler} that aggregates an {@link HttpMessage} - * and its following {@link HttpContent}s into a single {@link HttpMessage} with - * no following {@link HttpContent}s. It is useful when you don't want to take + * and its following {@link HttpContent}s into a single {@link FullHttpRequest} + * or {@link FullHttpResponse} (depending on if it used to handle requests or responses) + * with no following {@link HttpContent}s. It is useful when you don't want to take * care of HTTP messages whose transfer encoding is 'chunked'. Insert this * handler after {@link HttpObjectDecoder} in the {@link ChannelPipeline}: *
@@ -45,6 +46,8 @@ import static io.netty.handler.codec.http.HttpHeaders.*;
  * ...
  * p.addLast("handler", new HttpRequestHandler());
  * 
+ * Be aware that you need to have the {@link HttpResponseEncoder} or {@link HttpRequestEncoder} + * before the {@link HttpObjectAggregator} in the {@link ChannelPipeline}. */ public class HttpObjectAggregator extends MessageToMessageDecoder { public static final int DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS = 1024;