org.apache.hc.core5.http.message

## Enum StatusLine.StatusClass

- java.lang.Object
- - java.lang.Enum<StatusLine.StatusClass>
  - - org.apache.hc.core5.http.message.StatusLine.StatusClass

- All Implemented Interfaces:
    Serializable, Comparable<StatusLine.StatusClass>
  Enclosing class:
    StatusLine

      public static enum StatusLine.StatusClass
      extends Enum<StatusLine.StatusClass>

  Standard classes of HTTP status codes, plus `OTHER` for non-standard codes.
  See Also:
    `HttpStatus`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CLIENT_ERROR` Client Error `4xx` HTTP status codes.
    `INFORMATIONAL` Informational `1xx` HTTP status codes.
    `OTHER` Any other HTTP status codes (e.g.
    `REDIRECTION` Redirection `3xx` HTTP status codes.
    `SERVER_ERROR` `5xx` HTTP status codes.
    `SUCCESSFUL` Successful `2xx` HTTP status codes.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static StatusLine.StatusClass` | `from(int statusCode)` Gets the response status class for the given status code.
    `static StatusLine.StatusClass` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static StatusLine.StatusClass[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### INFORMATIONAL

          public static final StatusLine.StatusClass INFORMATIONAL

      Informational `1xx` HTTP status codes.

    - #### SUCCESSFUL

          public static final StatusLine.StatusClass SUCCESSFUL

      Successful `2xx` HTTP status codes.

    - #### REDIRECTION

          public static final StatusLine.StatusClass REDIRECTION

      Redirection `3xx` HTTP status codes.

    - #### CLIENT_ERROR

          public static final StatusLine.StatusClass CLIENT_ERROR

      Client Error `4xx` HTTP status codes.

    - #### SERVER_ERROR

          public static final StatusLine.StatusClass SERVER_ERROR

      `5xx` HTTP status codes.

    - #### OTHER

          public static final StatusLine.StatusClass OTHER

      Any other HTTP status codes (e.g. non-standard status codes).

  - ### Method Detail

    - #### values

          public static StatusLine.StatusClass[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (StatusLine.StatusClass c : StatusLine.StatusClass.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static StatusLine.StatusClass 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

    - #### from

          public static StatusLine.StatusClass from(int statusCode)

      Gets the response status class for the given status code.
      Parameters:
        `statusCode` - response status code to get the class for.
      Returns:
        class of the response status code.
      See Also:
        `HttpStatus`

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.