Class HttpClientException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ContentLengthExceededException, EmptyResponseException, HttpClientResponseException, NoHostException, ReadTimeoutException

public class HttpClientException extends HttpException
Parent class for all HTTP client exceptions.
Since:
1.0
Author:
Graeme Rocher
See Also:
  • Constructor Details

    • HttpClientException

      public HttpClientException(String message)
      Parameters:
      message - The message
    • HttpClientException

      public HttpClientException(String message, Throwable cause)
      Parameters:
      message - The message
      cause - The throwable
    • HttpClientException

      public HttpClientException(String message, Throwable cause, boolean shared)
      Parameters:
      message - The message
      cause - The throwable
      shared - Shared instance
  • Method Details

    • getServiceId

      @Nullable public final @Nullable String getServiceId()
      Get the service ID of the http client that produced this exception.
      Returns:
      The service ID of the client
    • setServiceId

      @Internal public final void setServiceId(String serviceId)
      Set the service id that produced this exception.
      Parameters:
      serviceId - The service id
      Throws:
      IllegalStateException - If the service ID has already been set, or this is a shared exception (e.g. ReadTimeoutException).
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable