public enum HttpErrorStatus extends java.lang.Enum<HttpErrorStatus> implements HttpStatusType
Modifier and Type | Class and Description |
---|---|
static class |
HttpErrorStatus.Family
An enumeration representing the class of status code.
|
Enum Constant and Description | |
---|---|
BAD_REQUEST
400 Bad Request, see HTTP/1.1 documentation.
|
|
CONFLICT
409 Conflict, see HTTP/1.1 documentation.
|
|
FORBIDDEN
403 Forbidden, see HTTP/1.1 documentation.
|
|
GONE
410 Gone, see HTTP/1.1 documentation.
|
|
INTERNAL_SERVER_ERROR
500 Internal Server Error, see HTTP/1.1 documentation.
|
|
NOT_ACCEPTABLE
406 Not Acceptable, see HTTP/1.1 documentation.
|
|
NOT_FOUND
404 Not Found, see HTTP/1.1 documentation.
|
|
PRECONDITION_FAILED
412 Precondition Failed, see HTTP/1.1 documentation.
|
|
REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large, see HTTP/1.1 documentation.
|
|
SERVICE_UNAVAILABLE
503 Service Unavailable, see HTTP/1.1 documentation.
|
|
TOO_MANY_REQUESTS
429 Too Many Requests, see
UNAUTHORIZED
401 Unauthorized, see HTTP/1.1 documentation.
| |
UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type, see HTTP/1.1 documentation.
|
Modifier and Type | Field and Description |
---|---|
private int |
code |
private HttpErrorStatus.Family |
family |
private java.lang.String |
reason |
Modifier and Type | Method and Description |
---|---|
static HttpErrorStatus |
fromStatusCode(int statusCode)
Convert a numerical status code into the corresponding Status
|
HttpErrorStatus.Family |
getFamily()
Get the class of status code
|
java.lang.String |
getReasonPhrase()
Get the reason phrase
|
int |
getStatusCode()
Get the associated status code
|
java.lang.String |
toString()
Get the reason phrase
|
static HttpErrorStatus |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HttpErrorStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
for (HttpErrorStatus c : HttpErrorStatus.values()) System.out.println(c);
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 nullgetFamily
in interface HttpStatusType
getStatusCode
in interface HttpStatusType
getReasonPhrase
in interface HttpStatusType
toString
in class java.lang.Enum<HttpErrorStatus>
statusCode
- the numerical status code