Enum HttpStatus

java.lang.Object
java.lang.Enum<HttpStatus>
net.aifusion.cimserver.HttpStatus
All Implemented Interfaces:
Serializable, Comparable<HttpStatus>, java.lang.constant.Constable

public enum HttpStatus extends Enum<HttpStatus>
Enumeration to manage HTTP status values
Author:
Sharad Singhal
  • Enum Constant Details

    • CONTINUE

      public static final HttpStatus CONTINUE
      100 - Continue
    • SWITCH_PROTOCOL

      public static final HttpStatus SWITCH_PROTOCOL
      101 - Switching Protocols
    • OK

      public static final HttpStatus OK
      200 - OK
    • CREATED

      public static final HttpStatus CREATED
      201 - Created
    • ACCEPTED

      public static final HttpStatus ACCEPTED
      202 - Accepted
    • NON_AUTHORITATIVE_INFORMATION

      public static final HttpStatus NON_AUTHORITATIVE_INFORMATION
      203 - Non Authoritative Information
    • NO_CONTENT

      public static final HttpStatus NO_CONTENT
      204 - No Content
    • RESET_CONTENT

      public static final HttpStatus RESET_CONTENT
      205 - Reset Content
    • PARTIAL_CONTENT

      public static final HttpStatus PARTIAL_CONTENT
      206 - Partial Content
    • REDIRECT

      public static final HttpStatus REDIRECT
      301 - Moved Permanently
    • NOT_MODIFIED

      public static final HttpStatus NOT_MODIFIED
      304 - Not Modified
    • BAD_REQUEST

      public static final HttpStatus BAD_REQUEST
      400 - bad request
    • UNAUTHORIZED

      public static final HttpStatus UNAUTHORIZED
      401 - Unauthorized
    • FORBIDDEN

      public static final HttpStatus FORBIDDEN
      403 - Forbidden
    • NOT_FOUND

      public static final HttpStatus NOT_FOUND
      404 - Not Found
    • METHOD_NOT_ALLOWED

      public static final HttpStatus METHOD_NOT_ALLOWED
      405 - Method not allowed
    • NOT_ACCEPTABLE

      public static final HttpStatus NOT_ACCEPTABLE
      406 - Not acceptable
    • REQUEST_TIMEOUT

      public static final HttpStatus REQUEST_TIMEOUT
      408 - Request Timeout
    • CONFLICT

      public static final HttpStatus CONFLICT
      409 - Conflict
    • LENGTH_REQUIRED

      public static final HttpStatus LENGTH_REQUIRED
      411 - Length required
    • PAYLOAD_TOO_LARGE

      public static final HttpStatus PAYLOAD_TOO_LARGE
      413 - Payload too large
    • URI_TOO_LONG

      public static final HttpStatus URI_TOO_LONG
      414 - URI too long
    • UNSUPPORTED_MEDIA_TYPE

      public static final HttpStatus UNSUPPORTED_MEDIA_TYPE
      415 - Unsupported Media Type
    • RANGE_NOT_SATISFIABLE

      public static final HttpStatus RANGE_NOT_SATISFIABLE
      416 - Range Not Satisfiable
    • INTERNAL_ERROR

      public static final HttpStatus INTERNAL_ERROR
      500 - Internal Server Error
    • NOT_IMPLEMENTED

      public static final HttpStatus NOT_IMPLEMENTED
      501 - Not Implemented
    • SERVICE_UNAVAILABLE

      public static final HttpStatus SERVICE_UNAVAILABLE
      503 - Service Unavailable
    • GATEWAY_TIMEOUT

      public static final HttpStatus GATEWAY_TIMEOUT
      504 - Gateway Timeout
    • UNSUPPORTED_HTTP_VERSION

      public static final HttpStatus UNSUPPORTED_HTTP_VERSION
      505 - Http version not supported
  • Method Details

    • values

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

      public static HttpStatus valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • code

      public String code()
      Code associated with this status
      Returns:
      - code for this status
    • description

      public String description()
      Description associated with this status
      Returns:
      - description for this status
    • lookup

      public static HttpStatus lookup(int status)
      Look up the status associated with a status code
      Parameters:
      status - - integer code value (e.g., 200)
      Returns:
      - HTTP Status
    • toString

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