org.apache.hc.core5.http.support

## Class AbstractMessageBuilder<T>

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

- Direct Known Subclasses:
    AbstractRequestBuilder, AbstractResponseBuilder

      public abstract class AbstractMessageBuilder<T>
      extends Object

  Abstract `HttpMessage` builder.
  Since:
    5.1

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractMessageBuilder()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AbstractMessageBuilder<T>` | `addHeader(Header header)`
    `AbstractMessageBuilder<T>` | `addHeader(String name, String value)`
    `protected abstract T` | `build()`
    `protected void` | `digest(HttpMessage message)`
    `Header` | `getFirstHeader(String name)`
    `Header[]` | `getFirstHeaders()`
    `Header[]` | `getHeaders()`
    `Header[]` | `getHeaders(String name)`
    `Header` | `getLastHeader(String name)`
    `ProtocolVersion` | `getVersion()`
    `AbstractMessageBuilder<T>` | `removeHeader(Header header)`
    `AbstractMessageBuilder<T>` | `removeHeaders(String name)`
    `AbstractMessageBuilder<T>` | `setHeader(Header header)`
    `AbstractMessageBuilder<T>` | `setHeader(String name, String value)`
    `AbstractMessageBuilder<T>` | `setHeaders(Header... headers)`
    `AbstractMessageBuilder<T>` | `setHeaders(Iterator<Header> it)`
    `AbstractMessageBuilder<T>` | `setVersion(ProtocolVersion version)`

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

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

- - ### Constructor Detail

    - #### AbstractMessageBuilder

          protected AbstractMessageBuilder()

  - ### Method Detail

    - #### digest

          protected void digest(HttpMessage message)

    - #### getVersion

          public ProtocolVersion getVersion()

    - #### setVersion

          public AbstractMessageBuilder<T> setVersion(ProtocolVersion version)

    - #### getHeaders

          public Header[] getHeaders()

    - #### getHeaders

          public Header[] getHeaders(String name)

    - #### setHeaders

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

    - #### setHeaders

          public AbstractMessageBuilder<T> setHeaders(Iterator<Header> it)

    - #### getFirstHeaders

          public Header[] getFirstHeaders()

    - #### getFirstHeader

          public Header getFirstHeader(String name)

    - #### getLastHeader

          public Header getLastHeader(String name)

    - #### addHeader

          public AbstractMessageBuilder<T> addHeader(Header header)

    - #### addHeader

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

    - #### removeHeader

          public AbstractMessageBuilder<T> removeHeader(Header header)

    - #### removeHeaders

          public AbstractMessageBuilder<T> removeHeaders(String name)

    - #### setHeader

          public AbstractMessageBuilder<T> setHeader(Header header)

    - #### setHeader

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

    - #### build

          protected abstract T build()

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