Hi Trustin,

> We could make our current class hierarchy more granular like the following:
>
> * HttpMessage
> ** HttpRequest - no getContent()
> *** MergedHttpRequest - getContent() here
> *** ChunkedHttpRequest - once written, encoder expects HttpChunks,
> other HttpRequest or disconnection.
> ** HttpResponse - no getContent()
> *** MergedHttpResponse - getContent() here
> *** ChunkedHttpResponse - once written, encoder expects HttpChunks,
> other HttpResponse or disconnection.
> * HttpChunk - getContent() here

Looks great.

Why is MergedHttpRequest needed? If someone wants to write a chunked
message he writes some ChunkedHttpRequests messages.

MergedHttpResponse could be returned as a normal HTTP message with
getContent( ).
If the application is interested about the merged HTTP chunks then it
is interested about the hole message so it could receive the message
as a standard HTTP message (from de decoder).
The application will not care if it's merged HTTP or standard HTTP in
this case, IMO.

I like the idea to first send ChunkedHttpResponse and subsequent
chunks as HttpChunks, (in my decoder I used only one class).

Bogdan

Reply via email to