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

## Class AsyncResponseBuilder

- java.lang.Object
- - org.apache.hc.core5.http.nio.support.AsyncResponseBuilder

-     public class AsyncResponseBuilder
      extends Object

  Builder for `AsyncResponseProducer` instances.
  Since:
    5.0

- - ### Method Summary

    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()`
    `Header` | `getFirstHeader(String name)`
    `Header[]` | `getHeaders(String name)`
    `Header` | `getLastHeader(String name)`
    `ProtocolVersion` | `getVersion()`
    `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 java.lang.Object

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

- - ### Method Detail

    - #### create

          public static AsyncResponseBuilder create(int status)

    - #### getVersion

          public ProtocolVersion getVersion()

    - #### setVersion

          public AsyncResponseBuilder setVersion(ProtocolVersion version)

    - #### getHeaders

          public Header[] getHeaders(String name)

    - #### setHeaders

          public AsyncResponseBuilder setHeaders(Header... headers)

    - #### getFirstHeader

          public Header getFirstHeader(String name)

    - #### getLastHeader

          public Header getLastHeader(String name)

    - #### addHeader

          public AsyncResponseBuilder addHeader(Header header)

    - #### addHeader

          public AsyncResponseBuilder addHeader(String name,
                                       String value)

    - #### removeHeader

          public AsyncResponseBuilder removeHeader(Header header)

    - #### removeHeaders

          public AsyncResponseBuilder removeHeaders(String name)

    - #### setHeader

          public AsyncResponseBuilder setHeader(Header header)

    - #### setHeader

          public AsyncResponseBuilder setHeader(String name,
                                       String value)

    - #### 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()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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