org.apache.hc.core5.testing.nio

## Class Http1TestClient

- java.lang.Object
- - org.apache.hc.core5.testing.nio.AsyncRequester
  - - org.apache.hc.core5.testing.nio.Http1TestClient

- All Implemented Interfaces:
    AutoCloseable, ConnectionInitiator

      public class Http1TestClient
      extends AsyncRequester

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Http1TestClient()`
    `Http1TestClient(IOReactorConfig ioReactorConfig, SSLContext sslContext, SSLSessionInitializer sslSessionInitializer, SSLSessionVerifier sslSessionVerifier)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `awaitShutdown(TimeValue waitTime)`
    `void` | `close()`
    `void` | `configure(Http1Config http1Config)`
    `void` | `configure(HttpProcessor httpProcessor)`
    `void` | `configure(NHttpMessageParserFactory<HttpResponse> responseParserFactory)`
    `void` | `configure(NHttpMessageWriterFactory<HttpRequest> requestWriterFactory)`
    `Future<ClientSessionEndpoint>` | `connect(HttpHost host, Timeout timeout)`
    `Future<ClientSessionEndpoint>` | `connect(HttpHost host, Timeout timeout, FutureCallback<ClientSessionEndpoint> callback)`
    `Future<ClientSessionEndpoint>` | `connect(String hostname, int port, Timeout timeout)`
    `protected void` | `execute(IOEventHandlerFactory ioEventHandlerFactory)`
    `IOReactorStatus` | `getStatus()`
    `void` | `initiateShutdown()`
    `void` | `shutdown(TimeValue graceTime)`
    `void` | `start()`
    `void` | `start(Http1Config http1Config)` Deprecated. Use `configure(Http1Config)`, `start()`.
    `void` | `start(HttpProcessor httpProcessor, Http1Config http1Config)` Deprecated. Use `configure(Http1Config)`, `configure(HttpProcessor)`, `start()`.

    - ### Methods inherited from class org.apache.hc.core5.testing.nio.AsyncRequester

      `connect, requestSession`

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

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

- - ### Constructor Detail

    - #### Http1TestClient

          public Http1TestClient(IOReactorConfig ioReactorConfig,
                                 SSLContext sslContext,
                                 SSLSessionInitializer sslSessionInitializer,
                                 SSLSessionVerifier sslSessionVerifier)
                          throws IOException

      Throws:
        `IOException`

    - #### Http1TestClient

          public Http1TestClient()
                          throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### configure

          public void configure(Http1Config http1Config)

      Since:
        5.3

    - #### configure

          public void configure(HttpProcessor httpProcessor)

      Since:
        5.3

    - #### configure

          @Internal
          public void configure(NHttpMessageParserFactory<HttpResponse> responseParserFactory)

    - #### configure

          @Internal
          public void configure(NHttpMessageWriterFactory<HttpRequest> requestWriterFactory)

    - #### start

          @Deprecated
          public void start(HttpProcessor httpProcessor,
                                        Http1Config http1Config)
                                 throws IOException

      Deprecated. Use `configure(Http1Config)`, `configure(HttpProcessor)`, `start()`.
      Throws:
        `IOException`

    - #### start

          @Deprecated
          public void start(Http1Config http1Config)
                                 throws IOException

      Deprecated. Use `configure(Http1Config)`, `start()`.
      Throws:
        `IOException`

    - #### start

          public void start()
                     throws IOException

      Throws:
        `IOException`

    - #### connect

          public Future<ClientSessionEndpoint> connect(HttpHost host,
                                                       Timeout timeout,
                                                       FutureCallback<ClientSessionEndpoint> callback)

    - #### connect

          public Future<ClientSessionEndpoint> connect(HttpHost host,
                                                       Timeout timeout)

    - #### connect

          public Future<ClientSessionEndpoint> connect(String hostname,
                                                       int port,
                                                       Timeout timeout)

    - #### execute

          protected void execute(IOEventHandlerFactory ioEventHandlerFactory)
                          throws IOException

      Throws:
        `IOException`

    - #### getStatus

          public IOReactorStatus getStatus()

    - #### awaitShutdown

          public void awaitShutdown(TimeValue waitTime)
                             throws InterruptedException

      Throws:
        `InterruptedException`

    - #### initiateShutdown

          public void initiateShutdown()

    - #### shutdown

          public void shutdown(TimeValue graceTime)

    - #### close

          public void close()
                     throws Exception

      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `Exception`

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