Class HttpStatusException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.refcodes.exception.AbstractException
All Implemented Interfaces:
Serializable, org.refcodes.exception.ErrorCodeAccessor, org.refcodes.exception.Trap, org.refcodes.mixin.StatusCodeAccessor<HttpStatusCode>, UrlAccessor
Direct Known Subclasses:
BadGatewayException, BadRequestException, ConflictException, ExpectationFailedException, FailedDependencyException, ForbiddenException, GatewayTimeoutException, GoneException, HttpResponseException, HttpVersionNotSupportedException, InsufficientSpaceOnResourceException, InsufficientStorageException, InternalClientErrorException, InternalServerErrorException, LengthRequiredException, LockedException, MethodFailureException, MethodNotAllowedException, MovedPermanentlyException, MovedTemporarilyException, MultipleChoicesException, MultiStatusException, NoContentException, NonAuthoritativeInformationException, NotAcceptableException, NotFoundException, NotImplementedException, NotModifiedException, PartialContentException, PaymentRequiredException, PreconditionFailedException, ProxyAuthenticationRequiredException, ReauthenticationRequiredException, RequestedRangeNotSatisfiableException, RequestTimeoutException, RequestTooLongException, RequestUriTooLongException, ResetContentException, SeeOtherException, ServiceUnavailableException, TemporaryRedirectException, UnassignedStatusCodeException, UnauthorizedException, UnavailableForLegalReasonsException, UnprocessableEntityException, UnsupportedMediaTypeException, UseProxyException, VersionNotSupportedException

public class HttpStatusException extends HttpException implements org.refcodes.mixin.StatusCodeAccessor<HttpStatusCode>, UrlAccessor
Base HTTP exception, thrown in case of HTTP status code related exceptions (e.g. as of a HTTP response was of an erroneous status).
See Also:
  • Field Details

  • Constructor Details

    • HttpStatusException

      public HttpStatusException(String aMessage, HttpStatusCode aStatusCode, String aErrorCode)
      Parameters:
      aStatusCode - The status code involved in this exception.
    • HttpStatusException

      public HttpStatusException(String aMessage, HttpStatusCode aStatusCode, Throwable aCause, String aErrorCode)
      Parameters:
      aStatusCode - The status code involved in this exception.
    • HttpStatusException

      public HttpStatusException(String aMessage, HttpStatusCode aStatusCode, Throwable aCause)
      Parameters:
      aStatusCode - The status code involved in this exception.
    • HttpStatusException

      public HttpStatusException(String aMessage, HttpStatusCode aStatusCode)
      Parameters:
      aStatusCode - The status code involved in this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, Throwable aCause, String aErrorCode)
      Parameters:
      aStatusCode - The status code involved in this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, Throwable aCause)
      Parameters:
      aStatusCode - The status code involved in this exception.
    • HttpStatusException

      public HttpStatusException(String aMessage, HttpStatusCode aStatusCode, Url aUrl, String aErrorCode)
      Parameters:
      aStatusCode - The status code involved in this exception.
      aUrl - The URL involved in this exception.
    • HttpStatusException

      public HttpStatusException(String aMessage, HttpStatusCode aStatusCode, Url aUrl, Throwable aCause, String aErrorCode)
      Parameters:
      aStatusCode - The status code involved in this exception.
      aUrl - The URL involved in this exception.
    • HttpStatusException

      public HttpStatusException(String aMessage, HttpStatusCode aStatusCode, Url aUrl, Throwable aCause)
      Parameters:
      aStatusCode - The status code involved in this exception.
      aUrl - The URL involved in this exception.
    • HttpStatusException

      public HttpStatusException(String aMessage, HttpStatusCode aStatusCode, Url aUrl)
      Parameters:
      aStatusCode - The status code involved in this exception.
      aUrl - The URL involved in this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, Url aUrl, Throwable aCause, String aErrorCode)
      Parameters:
      aStatusCode - The status code involved in this exception.
      aUrl - The URL involved in this exception.
    • HttpStatusException

      public HttpStatusException(HttpStatusCode aStatusCode, Url aUrl, Throwable aCause)
      Parameters:
      aStatusCode - The status code involved in this exception.
      aUrl - The URL involved in this exception.
  • Method Details

    • getStatusCode

      public HttpStatusCode getStatusCode()
      Specified by:
      getStatusCode in interface org.refcodes.mixin.StatusCodeAccessor<HttpStatusCode>
    • getUrl

      public Url getUrl()
      Retrieves the Url from the Url property.
      Specified by:
      getUrl in interface UrlAccessor
      Returns:
      The Url stored by the Url property.
    • getPatternArguments

      public Object[] getPatternArguments()
      Specified by:
      getPatternArguments in interface org.refcodes.exception.Trap