org.apache.hc.core5.http.nio.support

## Class AsyncResponseBuilder

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

-     public class AsyncResponseBuilder
      extends AbstractResponseBuilder<AsyncResponseProducer>

  Builder for `AsyncResponseProducer` instances.
  Since:
    5.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AsyncResponseBuilder` | `addHeader(Header header)`
    `AsyncResponseBuilder` | `addHeader(String name, String value)`
    `AsyncResponseProducer` | `build()`
    `static AsyncResponseBuilder` | `create(int status)`
    `AsyncEntityProducer` | `getEntity()`
    `AsyncResponseBuilder` | `removeHeader(Header header)`
    `AsyncResponseBuilder` | `removeHeaders(String name)`
    `AsyncResponseBuilder` | `setEntity(AsyncEntityProducer entityProducer)`
    `AsyncResponseBuilder` | `setEntity(byte[] content, ContentType contentType)`
    `AsyncResponseBuilder` | `setEntity(String content)`
    `AsyncResponseBuilder` | `setEntity(String content, ContentType contentType)`
    `AsyncResponseBuilder` | `setHeader(Header header)`
    `AsyncResponseBuilder` | `setHeader(String name, String value)`
    `AsyncResponseBuilder` | `setHeaders(Header... headers)`
    `AsyncResponseBuilder` | `setVersion(ProtocolVersion version)`
    `String` | `toString()`

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

      `getStatus, setStatus`

    - ### 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, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static AsyncResponseBuilder create(int status)

    - #### setVersion

          public AsyncResponseBuilder setVersion(ProtocolVersion version)

      Overrides:
        `setVersion` in class `AbstractResponseBuilder<AsyncResponseProducer>`

    - #### setHeaders

          public AsyncResponseBuilder setHeaders(Header... headers)

      Overrides:
        `setHeaders` in class `AbstractResponseBuilder<AsyncResponseProducer>`

    - #### addHeader

          public AsyncResponseBuilder addHeader(Header header)

      Overrides:
        `addHeader` in class `AbstractResponseBuilder<AsyncResponseProducer>`

    - #### addHeader

          public AsyncResponseBuilder addHeader(String name,
                                                String value)

      Overrides:
        `addHeader` in class `AbstractResponseBuilder<AsyncResponseProducer>`

    - #### removeHeader

          public AsyncResponseBuilder removeHeader(Header header)

      Overrides:
        `removeHeader` in class `AbstractResponseBuilder<AsyncResponseProducer>`

    - #### removeHeaders

          public AsyncResponseBuilder removeHeaders(String name)

      Overrides:
        `removeHeaders` in class `AbstractResponseBuilder<AsyncResponseProducer>`

    - #### setHeader

          public AsyncResponseBuilder setHeader(Header header)

      Overrides:
        `setHeader` in class `AbstractResponseBuilder<AsyncResponseProducer>`

    - #### setHeader

          public AsyncResponseBuilder setHeader(String name,
                                                String value)

      Overrides:
        `setHeader` in class `AbstractResponseBuilder<AsyncResponseProducer>`

    - #### getEntity

          public AsyncEntityProducer getEntity()

    - #### setEntity

          public AsyncResponseBuilder setEntity(AsyncEntityProducer entityProducer)

    - #### setEntity

          public AsyncResponseBuilder setEntity(String content,
                                                ContentType contentType)

    - #### setEntity

          public AsyncResponseBuilder setEntity(String content)

    - #### setEntity

          public AsyncResponseBuilder setEntity(byte[] content,
                                                ContentType contentType)

    - #### build

          public AsyncResponseProducer build()

      Specified by:
        `build` in class `AbstractResponseBuilder<AsyncResponseProducer>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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