public class Status extends Object
This code has been kindly borrowed from Spring.
Modifier and Type | Field and Description |
---|---|
static Status |
ACCEPTED
202 Accepted . |
static Status |
ALREADY_REPORTED
208 Already Reported . |
static Status |
BAD_GATEWAY
502 Bad Gateway . |
static Status |
BAD_REQUEST
400 Bad Request . |
static Status |
BANDWIDTH_LIMIT_EXCEEDED
509 Bandwidth Limit Exceeded |
static Status |
CHECKPOINT
103 Checkpoint . |
static Status |
CONFLICT
409 Conflict . |
static Status |
CONTINUE
100 Continue . |
static Status |
CREATED
201 Created . |
static Status |
EXPECTATION_FAILED
417 Expectation Failed . |
static Status |
FAILED_DEPENDENCY
424 Failed Dependency . |
static Status |
FORBIDDEN
403 Forbidden . |
static Status |
FOUND
302 Found . |
static Status |
GATEWAY_TIMEOUT
504 Gateway Timeout . |
static Status |
GONE
410 Gone . |
static Status |
HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported . |
static Status |
I_AM_A_TEAPOT
418 I'm a teapot . |
static Status |
IM_USED
226 IM Used . |
static Status |
INSUFFICIENT_STORAGE
507 Insufficient Storage |
static Status |
LENGTH_REQUIRED
411 Length Required . |
static Status |
LOCKED
423 Locked . |
static Status |
LOOP_DETECTED
508 Loop Detected |
static Status |
METHOD_NOT_ALLOWED
405 Method Not Allowed . |
static Status |
MOVED_PERMANENTLY
301 Moved Permanently . |
static Status |
MULTI_STATUS
207 Multi-Status . |
static Status |
MULTIPLE_CHOICES
300 Multiple Choices . |
static Status |
NETWORK_AUTHENTICATION_REQUIRED
511 Network Authentication Required . |
static Status |
NO_CONTENT
204 No Content . |
static Status |
NON_AUTHORITATIVE_INFORMATION
203 Non-Authoritative Information . |
static Status |
NOT_ACCEPTABLE
406 Not Acceptable . |
static Status |
NOT_EXTENDED
510 Not Extended |
static Status |
NOT_FOUND
404 Not Found . |
static Status |
NOT_IMPLEMENTED
501 Not Implemented . |
static Status |
NOT_MODIFIED
304 Not Modified . |
static Status |
OK
200 OK . |
static Status |
PARTIAL_CONTENT
206 Partial Content . |
static Status |
PAYMENT_REQUIRED
402 Payment Required . |
static Status |
PRECONDITION_FAILED
412 Precondition failed . |
static Status |
PRECONDITION_REQUIRED
428 Precondition Required . |
static Status |
PROCESSING
102 Processing . |
static Status |
PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required . |
static Status |
REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large . |
static Status |
REQUEST_HEADER_FIELDS_TOO_LARGE
431 Request Header Fields Too Large . |
static Status |
REQUEST_TIMEOUT
408 Request Timeout . |
static Status |
REQUEST_URI_TOO_LONG
414 Request-URI Too Long . |
static Status |
REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable . |
static Status |
RESET_CONTENT
205 Reset Content . |
static Status |
RESUME_INCOMPLETE
308 Resume Incomplete . |
static Status |
SEE_OTHER
303 See Other . |
static Status |
SERVER_ERROR
500 Server Error . |
static Status |
SERVICE_UNAVAILABLE
503 Service Unavailable . |
static Status |
SWITCHING_PROTOCOLS
101 Switching Protocols . |
static Status |
TEMPORARY_REDIRECT
307 Temporary Redirect . |
static Status |
TOO_MANY_REQUESTS
429 Too Many Requests . |
static Status |
UNAUTHORIZED
401 Unauthorized . |
static Status |
UNPROCESSABLE_ENTITY
422 Unprocessable Entity . |
static Status |
UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type . |
static Status |
UPGRADE_REQUIRED
426 Upgrade Required . |
static Status |
USE_PROXY
305 Use Proxy . |
static Status |
VARIANT_ALSO_NEGOTIATES
506 Variant Also Negotiates |
Modifier and Type | Method and Description |
---|---|
boolean |
isError() |
String |
reason() |
String |
toString()
Return a string representation of this status code.
|
int |
value() |
static Status |
valueOf(int statusCode)
Return the enum constant of this type with the specified numeric value.
|
public static final Status SWITCHING_PROTOCOLS
101 Switching Protocols
.public static final Status CHECKPOINT
103 Checkpoint
.public static final Status NON_AUTHORITATIVE_INFORMATION
203 Non-Authoritative Information
.public static final Status ALREADY_REPORTED
208 Already Reported
.public static final Status IM_USED
226 IM Used
.public static final Status MULTIPLE_CHOICES
300 Multiple Choices
.public static final Status MOVED_PERMANENTLY
301 Moved Permanently
.public static final Status TEMPORARY_REDIRECT
307 Temporary Redirect
.public static final Status RESUME_INCOMPLETE
308 Resume Incomplete
.public static final Status PAYMENT_REQUIRED
402 Payment Required
.public static final Status METHOD_NOT_ALLOWED
405 Method Not Allowed
.public static final Status PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required
.public static final Status PRECONDITION_FAILED
412 Precondition failed
.public static final Status REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large
.public static final Status REQUEST_URI_TOO_LONG
414 Request-URI Too Long
.public static final Status UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type
.public static final Status REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable
.public static final Status EXPECTATION_FAILED
417 Expectation Failed
.public static final Status I_AM_A_TEAPOT
418 I'm a teapot
.public static final Status UNPROCESSABLE_ENTITY
422 Unprocessable Entity
.public static final Status FAILED_DEPENDENCY
424 Failed Dependency
.public static final Status UPGRADE_REQUIRED
426 Upgrade Required
.public static final Status PRECONDITION_REQUIRED
428 Precondition Required
.public static final Status TOO_MANY_REQUESTS
429 Too Many Requests
.public static final Status REQUEST_HEADER_FIELDS_TOO_LARGE
431 Request Header Fields Too Large
.public static final Status SERVICE_UNAVAILABLE
503 Service Unavailable
.public static final Status HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported
.public static final Status VARIANT_ALSO_NEGOTIATES
506 Variant Also Negotiates
public static final Status INSUFFICIENT_STORAGE
507 Insufficient Storage
public static final Status LOOP_DETECTED
508 Loop Detected
public static final Status BANDWIDTH_LIMIT_EXCEEDED
509 Bandwidth Limit Exceeded
public static final Status NOT_EXTENDED
510 Not Extended
public static final Status NETWORK_AUTHENTICATION_REQUIRED
511 Network Authentication Required
.public int value()
public boolean isError()
public String reason()
public String toString()
public static Status valueOf(int statusCode)
statusCode
- the numeric value of the enum to be returnedIllegalArgumentException
- if this enum has no constant for the specified numeric valueCopyright © 2017. All rights reserved.