public static enum StatusLine.StatusClass extends Enum<StatusLine.StatusClass>
OTHER
for non-standard codes.HttpStatus
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. |
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.
|
public static final StatusLine.StatusClass INFORMATIONAL
1xx
HTTP status codes.public static final StatusLine.StatusClass SUCCESSFUL
2xx
HTTP status codes.public static final StatusLine.StatusClass REDIRECTION
3xx
HTTP status codes.public static final StatusLine.StatusClass CLIENT_ERROR
4xx
HTTP status codes.public static final StatusLine.StatusClass SERVER_ERROR
5xx
HTTP status codes.public static final StatusLine.StatusClass OTHER
public static StatusLine.StatusClass[] values()
for (StatusLine.StatusClass c : StatusLine.StatusClass.values()) System.out.println(c);
public static StatusLine.StatusClass valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static StatusLine.StatusClass from(int statusCode)
statusCode
- response status code to get the class for.HttpStatus
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.