org.apache.hc.core5.http.support

## Class AbstractResponseBuilder<T>

- java.lang.Object
- - org.apache.hc.core5.http.support.AbstractMessageBuilder<T>
  - - org.apache.hc.core5.http.support.AbstractResponseBuilder<T>

- Direct Known Subclasses:
    AsyncPushBuilder, AsyncResponseBuilder, BasicResponseBuilder, ClassicResponseBuilder

      public abstract class AbstractResponseBuilder<T>
      extends AbstractMessageBuilder<T>

  Builder for `BasicHttpRequest` instances.
  Since:
    5.1

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractResponseBuilder(int status)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AbstractResponseBuilder<T>` | `addHeader(Header header)`
    `AbstractResponseBuilder<T>` | `addHeader(String name, String value)`
    `protected abstract T` | `build()`
    `int` | `getStatus()`
    `AbstractResponseBuilder<T>` | `removeHeader(Header header)`
    `AbstractResponseBuilder<T>` | `removeHeaders(String name)`
    `AbstractResponseBuilder<T>` | `setHeader(Header header)`
    `AbstractResponseBuilder<T>` | `setHeader(String name, String value)`
    `AbstractResponseBuilder<T>` | `setHeaders(Header... headers)`
    `void` | `setStatus(int status)`
    `AbstractResponseBuilder<T>` | `setVersion(ProtocolVersion version)`

    - ### Methods inherited from class org.apache.hc.core5.http.support.AbstractMessageBuilder

      `digest, getFirstHeader, getFirstHeaders, getHeaders, getHeaders, getLastHeader, getVersion, setHeaders`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractResponseBuilder

          protected AbstractResponseBuilder(int status)

  - ### Method Detail

    - #### getStatus

          public int getStatus()

    - #### setStatus

          public void setStatus(int status)

    - #### setVersion

          public AbstractResponseBuilder<T> setVersion(ProtocolVersion version)

      Overrides:
        `setVersion` in class `AbstractMessageBuilder<T>`

    - #### setHeaders

          public AbstractResponseBuilder<T> setHeaders(Header... headers)

      Overrides:
        `setHeaders` in class `AbstractMessageBuilder<T>`

    - #### addHeader

          public AbstractResponseBuilder<T> addHeader(Header header)

      Overrides:
        `addHeader` in class `AbstractMessageBuilder<T>`

    - #### addHeader

          public AbstractResponseBuilder<T> addHeader(String name,
                                             String value)

      Overrides:
        `addHeader` in class `AbstractMessageBuilder<T>`

    - #### removeHeader

          public AbstractResponseBuilder<T> removeHeader(Header header)

      Overrides:
        `removeHeader` in class `AbstractMessageBuilder<T>`

    - #### removeHeaders

          public AbstractResponseBuilder<T> removeHeaders(String name)

      Overrides:
        `removeHeaders` in class `AbstractMessageBuilder<T>`

    - #### setHeader

          public AbstractResponseBuilder<T> setHeader(Header header)

      Overrides:
        `setHeader` in class `AbstractMessageBuilder<T>`

    - #### setHeader

          public AbstractResponseBuilder<T> setHeader(String name,
                                             String value)

      Overrides:
        `setHeader` in class `AbstractMessageBuilder<T>`

    - #### build

          protected abstract T build()

      Specified by:
        `build` in class `AbstractMessageBuilder<T>`

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.