public enum Status extends Enum<Status>
| Modifier and Type | Class and Description |
|---|---|
static class |
Status.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.
|
CREATED
201 Created, see
HTTP/1.1 documentation.
|
FORBIDDEN
403 Forbidden, see
HTTP/1.1 documentation.
|
INTERNAL_SERVER_ERROR
500 Internal Server Error, see
HTTP/1.1 documentation.
|
METHOD_NOT_ALLOWED
405 Method Not Allowed, see List of HTTP status
codes.
|
MOVED_PERMANENTLY
301 Moved Permanently, see
HTTP/1.1 documentation
|
NO_CONTENT
204 No Content, 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.
|
OK
200 OK, see
HTTP/1.1 documentation.
|
SERVICE_UNAVAILABLE
503 Service Unavailable, see
HTTP/1.1 documentation.
|
TEMPORARY_REDIRECT
307 Temporary Redirect, see
HTTP/1.1 documentation.
|
TOO_MANY_REQUESTS
429 Too Many Requests, see
Additional HTTP Status Codes.
|
UNAUTHORIZED
401 Unauthorized, see
HTTP/1.1 documentation.
|
| Modifier and Type | Method and Description |
|---|---|
static Status |
fromStatusCode(int statusCode)
Convert a numerical status code into the corresponding Status
|
Status.Family |
getFamily()
Get the class of status code
|
String |
getReasonPhrase()
Get the reason phrase
|
int |
getStatusCode()
Get the associated status code
|
String |
toString()
Get the reason phrase
|
static Status |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Status[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Status OK
public static final Status CREATED
public static final Status NO_CONTENT
public static final Status MOVED_PERMANENTLY
public static final Status TEMPORARY_REDIRECT
public static final Status BAD_REQUEST
public static final Status UNAUTHORIZED
public static final Status FORBIDDEN
public static final Status NOT_FOUND
public static final Status METHOD_NOT_ALLOWED
public static final Status NOT_ACCEPTABLE
public static final Status CONFLICT
public static final Status TOO_MANY_REQUESTS
public static final Status INTERNAL_SERVER_ERROR
public static final Status SERVICE_UNAVAILABLE
public static Status[] values()
for (Status c : Status.values()) System.out.println(c);
public static Status 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 Status.Family getFamily()
public int getStatusCode()
public String getReasonPhrase()
public String toString()
public static Status fromStatusCode(int statusCode)
statusCode - the numerical status codeCopyright © 2015 EVRYTHNG Ltd London / Zurich. All rights reserved.