public enum HttpStatusCodes extends java.lang.Enum<HttpStatusCodes>
| Enum Constant and Description |
|---|
BAD_REQUEST |
CONFLICT |
FORBIDDEN |
INTERNAL_SERVER_ERROR |
NO_CONTENT |
NOT_FOUND |
OK |
UNAUTHORIZED |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
Get the integer value corresponding to the HTTP Status Code
|
static HttpStatusCodes |
getHttpStatus(int statusCode)
Get the HttpStatus object for a HTTP Status Code
|
static boolean |
isSuccess(int statusCode)
Checks whether a status code is successful one
|
static HttpStatusCodes |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HttpStatusCodes[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpStatusCodes OK
public static final HttpStatusCodes NO_CONTENT
public static final HttpStatusCodes BAD_REQUEST
public static final HttpStatusCodes UNAUTHORIZED
public static final HttpStatusCodes FORBIDDEN
public static final HttpStatusCodes NOT_FOUND
public static final HttpStatusCodes CONFLICT
public static final HttpStatusCodes INTERNAL_SERVER_ERROR
public static HttpStatusCodes[] values()
for (HttpStatusCodes c : HttpStatusCodes.values()) System.out.println(c);
public static HttpStatusCodes valueOf(java.lang.String name)
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 nullpublic static boolean isSuccess(int statusCode)
statusCode - an HTTP Response Status Codepublic static HttpStatusCodes getHttpStatus(int statusCode)
statusCode - an HTTP Response Status Codepublic int getCode()