Enum Class HttpStatus

java.lang.Object
java.lang.Enum<HttpStatus>
com.dnlkk.controller.http.HttpStatus
All Implemented Interfaces:
HttpStatusCode, Serializable, Comparable<HttpStatus>, Constable

public enum HttpStatus extends Enum<HttpStatus> implements HttpStatusCode
  • Enum Constant Details

    • CONTINUE

      public static final HttpStatus CONTINUE
    • OK

      public static final HttpStatus OK
    • CREATED

      public static final HttpStatus CREATED
    • ACCEPTED

      public static final HttpStatus ACCEPTED
    • NO_CONTENT

      public static final HttpStatus NO_CONTENT
    • MULTIPLE_CHOICES

      public static final HttpStatus MULTIPLE_CHOICES
    • MOVED_PERMANENTLY

      public static final HttpStatus MOVED_PERMANENTLY
    • FOUND

      public static final HttpStatus FOUND
    • SEE_OTHER

      public static final HttpStatus SEE_OTHER
    • NOT_MODIFIED

      public static final HttpStatus NOT_MODIFIED
    • TEMPORARY_REDIRECT

      public static final HttpStatus TEMPORARY_REDIRECT
    • PERMANENT_REDIRECT

      public static final HttpStatus PERMANENT_REDIRECT
    • BAD_REQUEST

      public static final HttpStatus BAD_REQUEST
    • UNAUTHORIZED

      public static final HttpStatus UNAUTHORIZED
    • PAYMENT_REQUIRED

      public static final HttpStatus PAYMENT_REQUIRED
    • FORBIDDEN

      public static final HttpStatus FORBIDDEN
    • NOT_FOUND

      public static final HttpStatus NOT_FOUND
    • METHOD_NOT_ALLOWED

      public static final HttpStatus METHOD_NOT_ALLOWED
    • NOT_ACCEPTABLE

      public static final HttpStatus NOT_ACCEPTABLE
    • REQUEST_TIMEOUT

      public static final HttpStatus REQUEST_TIMEOUT
    • CONFLICT

      public static final HttpStatus CONFLICT
    • I_AM_A_TEAPOT

      public static final HttpStatus I_AM_A_TEAPOT
    • TOO_MANY_REQUESTS

      public static final HttpStatus TOO_MANY_REQUESTS
    • DNLKK_TRIED_SO_HARD

      public static final HttpStatus DNLKK_TRIED_SO_HARD
    • INTERNAL_SERVER_ERROR

      public static final HttpStatus INTERNAL_SERVER_ERROR
    • NOT_IMPLEMENTED

      public static final HttpStatus NOT_IMPLEMENTED
    • BAD_GATEWAY

      public static final HttpStatus BAD_GATEWAY
    • SERVICE_UNAVAILABLE

      public static final HttpStatus SERVICE_UNAVAILABLE
    • GATEWAY_TIMEOUT

      public static final HttpStatus GATEWAY_TIMEOUT
    • HTTP_VERSION_NOT_SUPPORTED

      public static final HttpStatus HTTP_VERSION_NOT_SUPPORTED
    • NETWORK_AUTHENTICATION_REQUIRED

      public static final HttpStatus NETWORK_AUTHENTICATION_REQUIRED
  • Method Details

    • values

      public static HttpStatus[] 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 HttpStatus 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()
      Specified by:
      code in interface HttpStatusCode
    • getStatusType

      public HttpStatusType getStatusType()
    • getReasonPhrase

      public String getReasonPhrase()
    • isInformational

      public boolean isInformational()
      Specified by:
      isInformational in interface HttpStatusCode
    • isSuccessful

      public boolean isSuccessful()
      Specified by:
      isSuccessful in interface HttpStatusCode
    • isRedirection

      public boolean isRedirection()
      Specified by:
      isRedirection in interface HttpStatusCode
    • isClientError

      public boolean isClientError()
      Specified by:
      isClientError in interface HttpStatusCode
    • isServerError

      public boolean isServerError()
      Specified by:
      isServerError in interface HttpStatusCode
    • isError

      public boolean isError()
      Specified by:
      isError in interface HttpStatusCode
    • toString

      public String toString()
      Overrides:
      toString in class Enum<HttpStatus>
    • valueOf

      public static HttpStatus valueOf(int statusCode)
      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:
      statusCode - 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
    • resolve

      public static HttpStatus resolve(int statusCode)