|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.http.HttpStatus
public class HttpStatus
HttpStatusCode enum class, for status codes based on various HTTP RFCs. (see table below)
Enum | Code | Message | RFC 1945 - HTTP/1.0 | RFC 2616 - HTTP/1.1 | RFC 2518 - WEBDAV |
---|---|---|---|---|---|
Informational - 1xx |
isInformational(int) |
||||
#CONTINUE |
100 | Continue | Sec. 10.1.1 | ||
#SWITCHING_PROTOCOLS |
101 | Switching Protocols | Sec. 10.1.2 | ||
#PROCESSING |
102 | Processing | Sec. 10.1 | ||
Success - 2xx |
isSuccess(int) |
||||
#OK |
200 | OK | Sec. 9.2 | Sec. 10.2.1 | |
#CREATED |
201 | Created | Sec. 9.2 | Sec. 10.2.2 | |
#ACCEPTED |
202 | Accepted | Sec. 9.2 | Sec. 10.2.3 | |
#NON_AUTHORITATIVE_INFORMATION |
203 | Non Authoritative Information | Sec. 10.2.4 | ||
#NO_CONTENT |
204 | No Content | Sec. 9.2 | Sec. 10.2.5 | |
#RESET_CONTENT |
205 | Reset Content | Sec. 10.2.6 | ||
#PARTIAL_CONTENT |
206 | Partial Content | Sec. 10.2.7 | ||
#MULTI_STATUS |
207 | Multi-Status | Sec. 10.2 | ||
draft/01 | |||||
Redirection - 3xx |
isRedirection(int) |
||||
#MULTIPLE_CHOICES |
300 | Multiple Choices | Sec. 9.3 | Sec. 10.3.1 | |
#MOVED_PERMANENTLY |
301 | Moved Permanently | Sec. 9.3 | Sec. 10.3.2 | |
#MOVED_TEMPORARILY |
302 | Moved Temporarily | Sec. 9.3 | (now "302 Found ") |
|
#FOUND |
302 | Found | (was "302 Moved Temporarily ") |
Sec. 10.3.3 | |
#SEE_OTHER |
303 | See Other | Sec. 10.3.4 | ||
#NOT_MODIFIED |
304 | Not Modified | Sec. 9.3 | Sec. 10.3.5 | |
#USE_PROXY |
305 | Use Proxy | Sec. 10.3.6 | ||
306 | (Unused) | Sec. 10.3.7 | |||
#TEMPORARY_REDIRECT |
307 | Temporary Redirect | Sec. 10.3.8 | ||
Client Error - 4xx |
isClientError(int) |
||||
#BAD_REQUEST |
400 | Bad Request | Sec. 9.4 | Sec. 10.4.1 | |
#UNAUTHORIZED |
401 | Unauthorized | Sec. 9.4 | Sec. 10.4.2 | |
#PAYMENT_REQUIRED |
402 | Payment Required | Sec. 9.4 | Sec. 10.4.3 | |
#FORBIDDEN |
403 | Forbidden | Sec. 9.4 | Sec. 10.4.4 | |
#NOT_FOUND |
404 | Not Found | Sec. 9.4 | Sec. 10.4.5 | |
#METHOD_NOT_ALLOWED |
405 | Method Not Allowed | Sec. 10.4.6 | ||
#NOT_ACCEPTABLE |
406 | Not Acceptable | Sec. 10.4.7 | ||
#PROXY_AUTHENTICATION_REQUIRED |
407 | Proxy Authentication Required | Sec. 10.4.8 | ||
#REQUEST_TIMEOUT |
408 | Request Timeout | Sec. 10.4.9 | ||
#CONFLICT |
409 | Conflict | Sec. 10.4.10 | ||
#GONE |
410 | Gone | Sec. 10.4.11 | ||
#LENGTH_REQUIRED |
411 | Length Required | Sec. 10.4.12 | ||
#PRECONDITION_FAILED |
412 | Precondition Failed | Sec. 10.4.13 | ||
#REQUEST_ENTITY_TOO_LARGE |
413 | Request Entity Too Large | Sec. 10.4.14 | ||
#REQUEST_URI_TOO_LONG |
414 | Request-URI Too Long | Sec. 10.4.15 | ||
#UNSUPPORTED_MEDIA_TYPE |
415 | Unsupported Media Type | Sec. 10.4.16 | ||
#REQUESTED_RANGE_NOT_SATISFIABLE |
416 | Requested Range Not Satisfiable | Sec. 10.4.17 | ||
#EXPECTATION_FAILED |
417 | Expectation Failed | Sec. 10.4.18 | ||
draft/01 | |||||
draft/05 | |||||
draft/01 | |||||
draft/05 | |||||
draft/05 | |||||
421 | (Unused) | ||||
#UNPROCESSABLE_ENTITY |
422 | Unprocessable Entity | Sec. 10.3 | ||
#LOCKED |
423 | Locked | Sec. 10.4 | ||
#FAILED_DEPENDENCY |
424 | Failed Dependency | Sec. 10.5 | ||
Server Error - 5xx |
isServerError(int) |
||||
#INTERNAL_SERVER_ERROR |
500 | Internal Server Error | Sec. 9.5 | Sec. 10.5.1 | |
#NOT_IMPLEMENTED |
501 | Not Implemented | Sec. 9.5 | Sec. 10.5.2 | |
#BAD_GATEWAY |
502 | Bad Gateway | Sec. 9.5 | Sec. 10.5.3 | |
#SERVICE_UNAVAILABLE |
503 | Service Unavailable | Sec. 9.5 | Sec. 10.5.4 | |
#GATEWAY_TIMEOUT |
504 | Gateway Timeout | Sec. 10.5.5 | ||
#HTTP_VERSION_NOT_SUPPORTED |
505 | HTTP Version Not Supported | Sec. 10.5.6 | ||
506 | (Unused) | ||||
#INSUFFICIENT_STORAGE |
507 | Insufficient Storage | Sec. 10.6 |
Nested Class Summary | |
---|---|
static class |
HttpStatus.Code
|
Constructor Summary | |
---|---|
HttpStatus()
|
Method Summary | |
---|---|
static HttpStatus.Code |
getCode(int code)
Get the HttpStatusCode for a specific code |
static String |
getMessage(int code)
Get the status message for a specific code. |
static boolean |
isClientError(int code)
Simple test against an code to determine if it falls into the Client Error message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1. |
static boolean |
isInformational(int code)
Simple test against an code to determine if it falls into the Informational message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1. |
static boolean |
isRedirection(int code)
Simple test against an code to determine if it falls into the Redirection message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1. |
static boolean |
isServerError(int code)
Simple test against an code to determine if it falls into the Server Error message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1. |
static boolean |
isSuccess(int code)
Simple test against an code to determine if it falls into the Success message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CONTINUE_100
public static final int SWITCHING_PROTOCOLS_101
public static final int PROCESSING_102
public static final int OK_200
public static final int CREATED_201
public static final int ACCEPTED_202
public static final int NON_AUTHORITATIVE_INFORMATION_203
public static final int NO_CONTENT_204
public static final int RESET_CONTENT_205
public static final int PARTIAL_CONTENT_206
public static final int MULTI_STATUS_207
public static final int MULTIPLE_CHOICES_300
public static final int MOVED_PERMANENTLY_301
public static final int MOVED_TEMPORARILY_302
public static final int FOUND_302
public static final int SEE_OTHER_303
public static final int NOT_MODIFIED_304
public static final int USE_PROXY_305
public static final int TEMPORARY_REDIRECT_307
public static final int BAD_REQUEST_400
public static final int UNAUTHORIZED_401
public static final int PAYMENT_REQUIRED_402
public static final int FORBIDDEN_403
public static final int NOT_FOUND_404
public static final int METHOD_NOT_ALLOWED_405
public static final int NOT_ACCEPTABLE_406
public static final int PROXY_AUTHENTICATION_REQUIRED_407
public static final int REQUEST_TIMEOUT_408
public static final int CONFLICT_409
public static final int GONE_410
public static final int LENGTH_REQUIRED_411
public static final int PRECONDITION_FAILED_412
public static final int REQUEST_ENTITY_TOO_LARGE_413
public static final int REQUEST_URI_TOO_LONG_414
public static final int UNSUPPORTED_MEDIA_TYPE_415
public static final int REQUESTED_RANGE_NOT_SATISFIABLE_416
public static final int EXPECTATION_FAILED_417
public static final int UNPROCESSABLE_ENTITY_422
public static final int LOCKED_423
public static final int FAILED_DEPENDENCY_424
public static final int INTERNAL_SERVER_ERROR_500
public static final int NOT_IMPLEMENTED_501
public static final int BAD_GATEWAY_502
public static final int SERVICE_UNAVAILABLE_503
public static final int GATEWAY_TIMEOUT_504
public static final int HTTP_VERSION_NOT_SUPPORTED_505
public static final int INSUFFICIENT_STORAGE_507
public static final int MAX_CODE
Constructor Detail |
---|
public HttpStatus()
Method Detail |
---|
public static HttpStatus.Code getCode(int code)
code
- the code to lookup.
HttpStatus
if found, or null if not found.public static String getMessage(int code)
code
- the code to look up
public static boolean isInformational(int code)
Informational
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.
code
- the code to test.
Informational
messages.public static boolean isSuccess(int code)
Success
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.
code
- the code to test.
Success
messages.public static boolean isRedirection(int code)
Redirection
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.
code
- the code to test.
Redirection
messages.public static boolean isClientError(int code)
Client Error
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.
code
- the code to test.
Client Error
messages.public static boolean isServerError(int code)
Server Error
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 2616 - HTTP/1.1.
code
- the code to test.
Server Error
messages.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |