Enum Class RequestError

java.lang.Object
java.lang.Enum<RequestError>
org.gcube.smartgears.handlers.application.request.RequestError
All Implemented Interfaces:
Serializable, Comparable<RequestError>, Constable

public enum RequestError extends Enum<RequestError>
Known error types.

Each type can throw a corresponding RequestException.

Author:
Fabio Simeoni
  • Enum Constant Details

    • application_failed_error

      public static final RequestError application_failed_error
      The error raised when requests are made to failed applications.
    • application_unavailable_error

      public static final RequestError application_unavailable_error
      The error raised when requests are made to stopped applications.
    • resource_notfound_error

      public static final RequestError resource_notfound_error
      The error raised when requests are made to unknown resources.
    • illegal_state_error

      public static final RequestError illegal_state_error
      The error raised when requests require illegal resource state transitions.
    • method_unsupported_error

      public static final RequestError method_unsupported_error
      The error raised when requests are made with unsupported HTTP methods.
    • invalid_request_error

      public static final RequestError invalid_request_error
      The error raised when requests are genrically invalid.
    • request_not_authorized_error

      public static final RequestError request_not_authorized_error
    • internal_server_error

      public static final RequestError internal_server_error
    • incoming_contenttype_unsupported_error

      public static final RequestError incoming_contenttype_unsupported_error
      The error raised when requests carry an unsupported media type.
    • outgoing_contenttype_unsupported_error

      public static final RequestError outgoing_contenttype_unsupported_error
      The error raised when requests request an unsupported media type.
    • application_error

      public static final RequestError application_error
      An error raised by managed applications.
  • Method Details

    • values

      public static RequestError[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RequestError valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • code

      public int code()
    • message

      public String message()
    • fire

      public void fire()
    • fire

      public void fire(String msg)
    • fire

      public void fire(Throwable cause)
    • fire

      public void fire(String msg, Throwable cause)
    • toException

      public RequestException toException()
    • toException

      public RequestException toException(String msg)
    • toException

      public RequestException toException(Throwable cause)
    • toException

      public RequestException toException(String msg, Throwable cause)