Enum Class HttpStatus.Code

java.lang.Object
java.lang.Enum<HttpStatus.Code>
org.eclipse.jetty.http.HttpStatus.Code
All Implemented Interfaces:
Serializable, Comparable<HttpStatus.Code>, Constable
Enclosing class:
HttpStatus

public static enum HttpStatus.Code extends Enum<HttpStatus.Code>
  • Enum Constant Details

  • Method Details

    • values

      public static HttpStatus.Code[] 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.Code 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
    • getCode

      public int getCode()
    • getMessage

      public String getMessage()
    • equals

      public boolean equals(int code)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<HttpStatus.Code>
    • isInformational

      public boolean isInformational()
      Simple test against an code to determine if it falls into the Informational message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.
      Returns:
      true if within range of codes that belongs to Informational messages.
    • isSuccess

      public boolean isSuccess()
      Simple test against an code to determine if it falls into the Success message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.
      Returns:
      true if within range of codes that belongs to Success messages.
    • isRedirection

      public boolean isRedirection()
      Simple test against an code to determine if it falls into the Redirection message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.
      Returns:
      true if within range of codes that belongs to Redirection messages.
    • isClientError

      public boolean isClientError()
      Simple test against an code to determine if it falls into the Client Error message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.
      Returns:
      true if within range of codes that belongs to Client Error messages.
    • isServerError

      public boolean isServerError()
      Simple test against an code to determine if it falls into the Server Error message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.
      Returns:
      true if within range of codes that belongs to Server Error messages.