org.apache.hc.client5.http

## Class HttpHostConnectException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.io.IOException
      - - java.net.SocketException
        - - java.net.ConnectException
          - - org.apache.hc.client5.http.HttpHostConnectException

- All Implemented Interfaces:
    Serializable

      public class HttpHostConnectException
      extends ConnectException

  A `ConnectException` that specifies the `NamedEndpoint` that was being connected to.
  Since:
    4.0
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpHostConnectException(String message)` Creates a HttpHostConnectException with the specified detail message.
    `HttpHostConnectException(String message, NamedEndpoint namedEndpoint)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `NamedEndpoint` | `getHost()`

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- - ### Constructor Detail

    - #### HttpHostConnectException

          public HttpHostConnectException(String message)

      Creates a HttpHostConnectException with the specified detail message.

    - #### HttpHostConnectException

          public HttpHostConnectException(String message,
                                          NamedEndpoint namedEndpoint)

  - ### Method Detail

    - #### getHost

          public NamedEndpoint getHost()

      Since:
        5.0

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