Class ServiceUnavailableException

All Implemented Interfaces:
Serializable

public class ServiceUnavailableException extends HttpException

A HTTP exception that indicates that the requested resource is Service Unavailable (503).

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Constructor Details

    • ServiceUnavailableException

      public ServiceUnavailableException()

      Creates a service unavailable exception.

    • ServiceUnavailableException

      public ServiceUnavailableException(String message)

      Creates a service unavailable exception with the specified message.

      Parameters:
      message - a message
    • ServiceUnavailableException

      public ServiceUnavailableException(Throwable cause)

      Creates a service unavailable exception with the specified cause.

      Parameters:
      cause - a cause
    • ServiceUnavailableException

      public ServiceUnavailableException(String message, Throwable cause)

      Creates a service unavailable exception with the specified message and cause.

      Parameters:
      message - a message
      cause - a cause
    • ServiceUnavailableException

      public ServiceUnavailableException(long retryAfter)

      Creates a service unavailable exception with the specified interval in seconds after which the failed request may be retried.

      Parameters:
      retryAfter - interval in seconds after which the failed request may be retried
    • ServiceUnavailableException

      public ServiceUnavailableException(long retryAfter, String message)

      Creates a service unavailable exception with the specified interval in seconds after which the failed request may be retried and message.

      Parameters:
      retryAfter - interval in seconds after which the failed request may be retried
      message - a message
    • ServiceUnavailableException

      public ServiceUnavailableException(long retryAfter, Throwable cause)

      Creates a service unavailable exception with the specified interval in seconds after which the failed request may be retried and cause.

      Parameters:
      retryAfter - interval in seconds after which the failed request may be retried
      cause - a cause
    • ServiceUnavailableException

      public ServiceUnavailableException(long retryAfter, String message, Throwable cause)

      Creates a service unavailable exception with the specified interval in seconds after which the failed request may be retried, message and cause.

      Parameters:
      retryAfter - interval in seconds after which the failed request may be retried
      message - a message
      cause - a cause
    • ServiceUnavailableException

      public ServiceUnavailableException(ZonedDateTime retryAfter)

      Creates a service unavailable exception with the specified date time after which the failed request may be retried.

      Parameters:
      retryAfter - a date time after which the failed request may be retried
    • ServiceUnavailableException

      public ServiceUnavailableException(ZonedDateTime retryAfter, String message)

      Creates a service unavailable exception with the specified date time after which the failed request may be retried and message.

      Parameters:
      retryAfter - a date time after which the failed request may be retried
      message - a message
    • ServiceUnavailableException

      public ServiceUnavailableException(ZonedDateTime retryAfter, Throwable cause)

      Creates a service unavailable exception with the specified date time after which the failed request may be retried and cause.

      Parameters:
      retryAfter - a date time after which the failed request may be retried
      cause - a cause
    • ServiceUnavailableException

      public ServiceUnavailableException(ZonedDateTime retryAfter, String message, Throwable cause)

      Creates a service unavailable exception with the specified date time after which the failed request may be retried, message and cause.

      Parameters:
      retryAfter - a date time after which the failed request may be retried
      message - a message
      cause - a cause
  • Method Details

    • getRetryAfter

      public Optional<ZonedDateTime> getRetryAfter()

      Returns the datetime after which the failed request may be retried.

      Returns:
      a zoned datetime