public static enum HttpResponseStatus.StatusClass extends java.lang.Enum<HttpResponseStatus.StatusClass>
Enum Constant and Description |
---|
CLIENT_ERROR_4XX
|
INFORMATIONAL_1XX
|
REDIRECTION_3XX
|
SERVER_ERROR_5XX
|
SUCCESSFUL_2XX
|
UNKNOWN
Unknown.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(HttpResponseStatus status)
Determine if
status code falls into this HttpResponseStatus.StatusClass . |
boolean |
contains(int statusCode)
Determine if
code falls into this HttpResponseStatus.StatusClass . |
static HttpResponseStatus.StatusClass |
fromStatusCode(int statusCode)
Determines the
HttpResponseStatus.StatusClass from the statusCode . |
static HttpResponseStatus.StatusClass |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HttpResponseStatus.StatusClass[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpResponseStatus.StatusClass INFORMATIONAL_1XX
public static final HttpResponseStatus.StatusClass SUCCESSFUL_2XX
public static final HttpResponseStatus.StatusClass REDIRECTION_3XX
public static final HttpResponseStatus.StatusClass CLIENT_ERROR_4XX
public static final HttpResponseStatus.StatusClass SERVER_ERROR_5XX
public static final HttpResponseStatus.StatusClass UNKNOWN
public static HttpResponseStatus.StatusClass[] values()
for (HttpResponseStatus.StatusClass c : HttpResponseStatus.StatusClass.values()) System.out.println(c);
public static HttpResponseStatus.StatusClass valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean contains(int statusCode)
code
falls into this HttpResponseStatus.StatusClass
.statusCode
- the status code to testtrue
if and only if the specified HTTP status code falls into this classpublic boolean contains(HttpResponseStatus status)
status
code falls into this HttpResponseStatus.StatusClass
.status
- the status to testtrue
if and only if the specified HTTP status code falls into this classpublic static HttpResponseStatus.StatusClass fromStatusCode(int statusCode)
HttpResponseStatus.StatusClass
from the statusCode
.statusCode
- the status code to use for determining the HttpResponseStatus.StatusClass
HttpResponseStatus.StatusClass
enum valuesjava.lang.IllegalArgumentException
- if statusCode
is not a 3-digit integer