public enum StatusCode extends Enum<StatusCode>
| Enum Constant and Description |
|---|
ACCEPTED |
BAD_GATEWAY |
BAD_REQUEST |
CONFLICT |
FORBIDDEN |
INSUFFICIENT_STORAGE |
INTERNAL_SERVER_ERROR |
METHOD_NOT_ALLOWED |
NOT_FOUND |
NOT_MODIFIED |
OK |
SERVICE_UNAVAILABLE |
TIMEOUT |
| Modifier and Type | Method and Description |
|---|---|
static StatusCode |
fromCode(int code)
Returns the enum StatusCode which matches the specified http status code.
|
int |
getStatusCode() |
String |
getStatusMessage() |
String |
toString() |
static StatusCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StatusCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StatusCode OK
public static final StatusCode ACCEPTED
public static final StatusCode NOT_MODIFIED
public static final StatusCode BAD_REQUEST
public static final StatusCode FORBIDDEN
public static final StatusCode NOT_FOUND
public static final StatusCode METHOD_NOT_ALLOWED
public static final StatusCode CONFLICT
public static final StatusCode INTERNAL_SERVER_ERROR
public static final StatusCode BAD_GATEWAY
public static final StatusCode SERVICE_UNAVAILABLE
public static final StatusCode TIMEOUT
public static final StatusCode INSUFFICIENT_STORAGE
public static StatusCode[] values()
for (StatusCode c : StatusCode.values()) System.out.println(c);
public static StatusCode 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 int getStatusCode()
public String getStatusMessage()
public String toString()
toString in class Enum<StatusCode>public static StatusCode fromCode(int code)
code - codeCopyright © 2016–2018. All rights reserved.