Home / Class/ ComposedLastHttpContent Class — netty Architecture

ComposedLastHttpContent Class — netty Architecture

Architecture documentation for the ComposedLastHttpContent class in ComposedLastHttpContent.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ae4df769_bf09_790f_1643_d73ac2707d84["ComposedLastHttpContent"]
  29fb5441_df81_b74a_13c7_3f144531dd73["ComposedLastHttpContent.java"]
  ae4df769_bf09_790f_1643_d73ac2707d84 -->|defined in| 29fb5441_df81_b74a_13c7_3f144531dd73
  80fb7bcb_db2b_7ab2_7029_f28b5a2a52e9["ComposedLastHttpContent()"]
  ae4df769_bf09_790f_1643_d73ac2707d84 -->|method| 80fb7bcb_db2b_7ab2_7029_f28b5a2a52e9
  03bfac76_e767_ffc1_d5c3_414caa3d48bd["HttpHeaders()"]
  ae4df769_bf09_790f_1643_d73ac2707d84 -->|method| 03bfac76_e767_ffc1_d5c3_414caa3d48bd
  b0de7588_1376_8174_cd18_83e2d9d03885["LastHttpContent()"]
  ae4df769_bf09_790f_1643_d73ac2707d84 -->|method| b0de7588_1376_8174_cd18_83e2d9d03885
  b8744f9c_e3c9_456d_98d0_f3ca2d76563a["ByteBuf()"]
  ae4df769_bf09_790f_1643_d73ac2707d84 -->|method| b8744f9c_e3c9_456d_98d0_f3ca2d76563a
  457d820a_0388_6077_4ef8_15fe69fae0b0["DecoderResult()"]
  ae4df769_bf09_790f_1643_d73ac2707d84 -->|method| 457d820a_0388_6077_4ef8_15fe69fae0b0
  ad05c5a3_767a_426a_2194_1b5b4b85545a["setDecoderResult()"]
  ae4df769_bf09_790f_1643_d73ac2707d84 -->|method| ad05c5a3_767a_426a_2194_1b5b4b85545a
  fda803ce_b6a2_ec44_adf3_c97072357b54["refCnt()"]
  ae4df769_bf09_790f_1643_d73ac2707d84 -->|method| fda803ce_b6a2_ec44_adf3_c97072357b54
  0a791e27_e2e7_9fe0_bf15_f2824c4d350d["release()"]
  ae4df769_bf09_790f_1643_d73ac2707d84 -->|method| 0a791e27_e2e7_9fe0_bf15_f2824c4d350d

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/ComposedLastHttpContent.java lines 23–119

final class ComposedLastHttpContent implements LastHttpContent {
    private final HttpHeaders trailingHeaders;
    private DecoderResult result;

    ComposedLastHttpContent(HttpHeaders trailingHeaders) {
        this.trailingHeaders = trailingHeaders;
    }

    ComposedLastHttpContent(HttpHeaders trailingHeaders, DecoderResult result) {
        this(trailingHeaders);
        this.result = result;
    }

    @Override
    public HttpHeaders trailingHeaders() {
        return trailingHeaders;
    }

    @Override
    public LastHttpContent copy() {
        LastHttpContent content = new DefaultLastHttpContent(Unpooled.EMPTY_BUFFER);
        content.trailingHeaders().set(trailingHeaders());
        return content;
    }

    @Override
    public LastHttpContent duplicate() {
        return copy();
    }

    @Override
    public LastHttpContent retainedDuplicate() {
        return copy();
    }

    @Override
    public LastHttpContent replace(ByteBuf content) {
        final LastHttpContent dup = new DefaultLastHttpContent(content);
        dup.trailingHeaders().setAll(trailingHeaders());
        return dup;
    }

    @Override
    public LastHttpContent retain(int increment) {
        return this;
    }

    @Override
    public LastHttpContent retain() {
        return this;
    }

    @Override
    public LastHttpContent touch() {
        return this;
    }

    @Override
    public LastHttpContent touch(Object hint) {
        return this;
    }

    @Override
    public ByteBuf content() {
        return Unpooled.EMPTY_BUFFER;
    }

    @Override
    public DecoderResult decoderResult() {
        return result;
    }

    @Override
    public DecoderResult getDecoderResult() {
        return decoderResult();
    }

    @Override
    public void setDecoderResult(DecoderResult result) {
        this.result = result;
    }

Frequently Asked Questions

What is the ComposedLastHttpContent class?
ComposedLastHttpContent is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/ComposedLastHttpContent.java.
Where is ComposedLastHttpContent defined?
ComposedLastHttpContent is defined in codec-http/src/main/java/io/netty/handler/codec/http/ComposedLastHttpContent.java at line 23.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free