public enum StatusCode extends Enum<StatusCode>
Enum Constant and Description |
---|
BAD_GATEWAY
The server was acting as a gateway or proxy and received an invalid response from the upstream server
|
BAD_REQUEST
The request cannot be fulfilled due to bad syntax.
|
CODE_UNKNOWN
Indicates the code we received is not found within this Enum
|
CONFLICT
Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.
|
EXPECTATION_FAILED
The server cannot meet the requirements of the Expect request-header field.
|
FORBIDDEN
The request was a valid request, but the server is refusing to respond to it.
|
GATEWAY_TIMEOUT
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
|
GONE
Indicates that the resource requested is no longer available and will not be available again
|
INTERNAL_SERVER_ERROR
A generic error message, given when no more specific message is suitable.
|
LENGTH_REQUIRED
The request did not specify the length of its content, which is required by the requested resource
|
METHOD_NOT_ALLOWED
A request was made of a resource using a request method not supported by that resource
|
NOT_ACCEPTABLE
The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.
|
NOT_FOUND
The requested resource could not be found but may be available again in the future
|
NOT_IMPLEMENTED
The server either does not recognize the request method, or it lacks the ability to fulfill the request
|
PAYMENT_REQUIRED
Reserved for future use.
|
PRE_CONDITION_FAILED
The server does not meet one of the preconditions that the requester put on the request
|
PROXY_AUTH_REQUIRED
The client must first authenticate itself with the proxy.
|
REQUEST_ENTITY_TOO_LARGE
The request is larger than the server is willing or able to process.
|
REQUEST_TIMEOUT
The server timed out waiting for the request.
|
REQUEST_URI_TOO_LONG
The URI provided was too long for the server to process.
|
REQUESTED_RANGE_NOT_SATISFIABLE
The client has asked for a portion of the file, but the server cannot supply that portion
|
SERVICE_UNAVAILABLE
The server is currently unavailable
|
UNAUTHORIZED
Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided
|
UNPROCESSABLE_ENTITY
The request was well-formed but was unable to be followed due to semantic errors
|
UNSUPPORTED_MEDIATYPE
The request entity has a media type which the server or resource does not support
|
VERSION_NOT_SUPPORTED
The server does not support the HTTP protocol version used in the request.
|
Modifier and Type | Method and Description |
---|---|
static StatusCode |
fromCode(int code) |
int |
getCode() |
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 BAD_REQUEST
public static final StatusCode UNAUTHORIZED
public static final StatusCode PAYMENT_REQUIRED
public static final StatusCode FORBIDDEN
public static final StatusCode NOT_FOUND
public static final StatusCode METHOD_NOT_ALLOWED
public static final StatusCode NOT_ACCEPTABLE
public static final StatusCode PROXY_AUTH_REQUIRED
public static final StatusCode REQUEST_TIMEOUT
public static final StatusCode CONFLICT
public static final StatusCode GONE
public static final StatusCode LENGTH_REQUIRED
public static final StatusCode PRE_CONDITION_FAILED
public static final StatusCode REQUEST_ENTITY_TOO_LARGE
public static final StatusCode REQUEST_URI_TOO_LONG
public static final StatusCode UNSUPPORTED_MEDIATYPE
public static final StatusCode REQUESTED_RANGE_NOT_SATISFIABLE
public static final StatusCode EXPECTATION_FAILED
public static final StatusCode UNPROCESSABLE_ENTITY
public static final StatusCode INTERNAL_SERVER_ERROR
public static final StatusCode NOT_IMPLEMENTED
public static final StatusCode BAD_GATEWAY
public static final StatusCode SERVICE_UNAVAILABLE
public static final StatusCode GATEWAY_TIMEOUT
public static final StatusCode VERSION_NOT_SUPPORTED
public static final StatusCode CODE_UNKNOWN
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 getCode()
public static StatusCode fromCode(int code)
Copyright © 2017. All rights reserved.