Enum HttpStatus

java.lang.Object
java.lang.Enum<HttpStatus>
com.codename1.backend.test.HttpStatus
All Implemented Interfaces:
HttpStatusCode, Comparable<HttpStatus>

public enum HttpStatus extends Enum<HttpStatus> implements HttpStatusCode
The common response statuses, so assertEquals(HttpStatus.OK, response.getStatusCode()) reads as it does in Spring.
  • Enum Constant Details

    • CONTINUE

      public static final HttpStatus CONTINUE
    • SWITCHING_PROTOCOLS

      public static final HttpStatus SWITCHING_PROTOCOLS
    • 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
    • PARTIAL_CONTENT

      public static final HttpStatus PARTIAL_CONTENT
    • 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
    • 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
    • GONE

      public static final HttpStatus GONE
    • LENGTH_REQUIRED

      public static final HttpStatus LENGTH_REQUIRED
    • PRECONDITION_FAILED

      public static final HttpStatus PRECONDITION_FAILED
    • PAYLOAD_TOO_LARGE

      public static final HttpStatus PAYLOAD_TOO_LARGE
    • UNSUPPORTED_MEDIA_TYPE

      public static final HttpStatus UNSUPPORTED_MEDIA_TYPE
    • REQUESTED_RANGE_NOT_SATISFIABLE

      public static final HttpStatus REQUESTED_RANGE_NOT_SATISFIABLE
    • EXPECTATION_FAILED

      public static final HttpStatus EXPECTATION_FAILED
    • UNPROCESSABLE_ENTITY

      public static final HttpStatus UNPROCESSABLE_ENTITY
    • TOO_MANY_REQUESTS

      public static final HttpStatus TOO_MANY_REQUESTS
    • REQUEST_HEADER_FIELDS_TOO_LARGE

      public static final HttpStatus REQUEST_HEADER_FIELDS_TOO_LARGE
    • 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
  • 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
    • value

      public int value()
      Description copied from interface: HttpStatusCode
      The numeric code.
      Specified by:
      value in interface HttpStatusCode
    • is1xxInformational

      public boolean is1xxInformational()
      Specified by:
      is1xxInformational in interface HttpStatusCode
    • is2xxSuccessful

      public boolean is2xxSuccessful()
      Specified by:
      is2xxSuccessful in interface HttpStatusCode
    • is3xxRedirection

      public boolean is3xxRedirection()
      Specified by:
      is3xxRedirection in interface HttpStatusCode
    • is4xxClientError

      public boolean is4xxClientError()
      Specified by:
      is4xxClientError in interface HttpStatusCode
    • is5xxServerError

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

      public boolean isError()
      Description copied from interface: HttpStatusCode
      A 4xx or a 5xx.
      Specified by:
      isError in interface HttpStatusCode
    • resolve

      public static HttpStatus resolve(int code)
      The constant for code, or null when there is none.
    • valueOf

      public static HttpStatus valueOf(int code)
      The constant for code; IllegalArgumentException when there is none.