public enum Status extends Enum<Status>
| Modifier and Type | Class and Description |
|---|---|
static class |
Status.Family
An enumeration representing the class of status code.
|
| 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 ACCEPTED
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 REQUEST_ENTITY_TOO_LARGE
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 © 2016 EVRYTHNG Ltd London / Zurich. All rights reserved.