public class HttpResponseStatus extends Object implements Comparable<HttpResponseStatus>
Modifier and Type | Field and Description |
---|---|
static HttpResponseStatus |
ACCEPTED
202 Accepted
|
static HttpResponseStatus |
BAD_GATEWAY
502 Bad Gateway
|
static HttpResponseStatus |
BAD_REQUEST
400 Bad Request
|
static HttpResponseStatus |
CONFLICT
409 Conflict
|
static HttpResponseStatus |
CONTINUE
100 Continue
|
static HttpResponseStatus |
CREATED
201 Created
|
static HttpResponseStatus |
EARLY_HINTS
103 Early Hints (RFC 8297)
|
static HttpResponseStatus |
EXPECTATION_FAILED
417 Expectation Failed
|
static HttpResponseStatus |
FAILED_DEPENDENCY
424 Failed Dependency (WebDAV, RFC4918)
|
static HttpResponseStatus |
FORBIDDEN
403 Forbidden
|
static HttpResponseStatus |
FOUND
302 Found
|
static HttpResponseStatus |
GATEWAY_TIMEOUT
504 Gateway Timeout
|
static HttpResponseStatus |
GONE
410 Gone
|
static HttpResponseStatus |
HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported
|
static HttpResponseStatus |
INSUFFICIENT_STORAGE
507 Insufficient Storage (WebDAV, RFC4918)
|
static HttpResponseStatus |
INTERNAL_SERVER_ERROR
500 Internal Server Error
|
static HttpResponseStatus |
LENGTH_REQUIRED
411 Length Required
|
static HttpResponseStatus |
LOCKED
423 Locked (WebDAV, RFC4918)
|
static HttpResponseStatus |
METHOD_NOT_ALLOWED
405 Method Not Allowed
|
static HttpResponseStatus |
MISDIRECTED_REQUEST
421 Misdirected Request
|
static HttpResponseStatus |
MOVED_PERMANENTLY
301 Moved Permanently
|
static HttpResponseStatus |
MULTI_STATUS
207 Multi-Status (WebDAV, RFC2518)
|
static HttpResponseStatus |
MULTIPLE_CHOICES
300 Multiple Choices
|
static HttpResponseStatus |
NETWORK_AUTHENTICATION_REQUIRED
511 Network Authentication Required (RFC6585)
|
static HttpResponseStatus |
NO_CONTENT
204 No Content
|
static HttpResponseStatus |
NON_AUTHORITATIVE_INFORMATION
203 Non-Authoritative Information (since HTTP/1.1)
|
static HttpResponseStatus |
NOT_ACCEPTABLE
406 Not Acceptable
|
static HttpResponseStatus |
NOT_EXTENDED
510 Not Extended (RFC2774)
|
static HttpResponseStatus |
NOT_FOUND
404 Not Found
|
static HttpResponseStatus |
NOT_IMPLEMENTED
501 Not Implemented
|
static HttpResponseStatus |
NOT_MODIFIED
304 Not Modified
|
static HttpResponseStatus |
OK
200 OK
|
static HttpResponseStatus |
PARTIAL_CONTENT
206 Partial Content
|
static HttpResponseStatus |
PAYMENT_REQUIRED
402 Payment Required
|
static HttpResponseStatus |
PERMANENT_REDIRECT
308 Permanent Redirect (RFC7538)
|
static HttpResponseStatus |
PRECONDITION_FAILED
412 Precondition Failed
|
static HttpResponseStatus |
PRECONDITION_REQUIRED
428 Precondition Required (RFC6585)
|
static HttpResponseStatus |
PROCESSING
102 Processing (WebDAV, RFC2518)
|
static HttpResponseStatus |
PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required
|
static HttpResponseStatus |
REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large
|
static HttpResponseStatus |
REQUEST_HEADER_FIELDS_TOO_LARGE
431 Request Header Fields Too Large (RFC6585)
|
static HttpResponseStatus |
REQUEST_TIMEOUT
408 Request Timeout
|
static HttpResponseStatus |
REQUEST_URI_TOO_LONG
414 Request-URI Too Long
|
static HttpResponseStatus |
REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable
|
static HttpResponseStatus |
RESET_CONTENT
205 Reset Content
|
static HttpResponseStatus |
SEE_OTHER
303 See Other (since HTTP/1.1)
|
static HttpResponseStatus |
SERVICE_UNAVAILABLE
503 Service Unavailable
|
static HttpResponseStatus |
SWITCHING_PROTOCOLS
101 Switching Protocols
|
static HttpResponseStatus |
TEMPORARY_REDIRECT
307 Temporary Redirect (since HTTP/1.1)
|
static HttpResponseStatus |
TOO_MANY_REQUESTS
429 Too Many Requests (RFC6585)
|
static HttpResponseStatus |
UNAUTHORIZED
401 Unauthorized
|
static HttpResponseStatus |
UNORDERED_COLLECTION
425 Unordered Collection (WebDAV, RFC3648)
|
static HttpResponseStatus |
UNPROCESSABLE_ENTITY
422 Unprocessable Entity (WebDAV, RFC4918)
|
static HttpResponseStatus |
UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type
|
static HttpResponseStatus |
UPGRADE_REQUIRED
426 Upgrade Required (RFC2817)
|
static HttpResponseStatus |
USE_PROXY
305 Use Proxy (since HTTP/1.1)
|
static HttpResponseStatus |
VARIANT_ALSO_NEGOTIATES
506 Variant Also Negotiates (RFC2295)
|
Constructor and Description |
---|
HttpResponseStatus(int code,
String reasonPhrase)
Creates a new instance with the specified
code and its reasonPhrase . |
Modifier and Type | Method and Description |
---|---|
int |
code()
Returns the code of this
HttpResponseStatus . |
AsciiString |
codeAsText()
Returns the status code as
AsciiString . |
HttpStatusClass |
codeClass()
Returns the class of this
HttpResponseStatus |
int |
compareTo(HttpResponseStatus o)
Equality of
HttpResponseStatus only depends on code() . |
boolean |
equals(Object o)
Equality of
HttpResponseStatus only depends on code() . |
int |
hashCode() |
static HttpResponseStatus |
parseLine(AsciiString line)
Parses the specified HTTP status line into a
HttpResponseStatus . |
static HttpResponseStatus |
parseLine(CharSequence line)
Parses the specified HTTP status line into a
HttpResponseStatus . |
static HttpResponseStatus |
parseLine(String line)
Parses the specified HTTP status line into a
HttpResponseStatus . |
String |
reasonPhrase()
Returns the reason phrase of this
HttpResponseStatus . |
String |
toString() |
static HttpResponseStatus |
valueOf(int code)
Returns the
HttpResponseStatus represented by the specified code. |
static HttpResponseStatus |
valueOf(int code,
String reasonPhrase)
|
public static final HttpResponseStatus CONTINUE
public static final HttpResponseStatus SWITCHING_PROTOCOLS
public static final HttpResponseStatus PROCESSING
public static final HttpResponseStatus EARLY_HINTS
public static final HttpResponseStatus OK
public static final HttpResponseStatus CREATED
public static final HttpResponseStatus ACCEPTED
public static final HttpResponseStatus NON_AUTHORITATIVE_INFORMATION
public static final HttpResponseStatus NO_CONTENT
public static final HttpResponseStatus RESET_CONTENT
public static final HttpResponseStatus PARTIAL_CONTENT
public static final HttpResponseStatus MULTI_STATUS
public static final HttpResponseStatus MULTIPLE_CHOICES
public static final HttpResponseStatus MOVED_PERMANENTLY
public static final HttpResponseStatus FOUND
public static final HttpResponseStatus SEE_OTHER
public static final HttpResponseStatus NOT_MODIFIED
public static final HttpResponseStatus USE_PROXY
public static final HttpResponseStatus TEMPORARY_REDIRECT
public static final HttpResponseStatus PERMANENT_REDIRECT
public static final HttpResponseStatus BAD_REQUEST
public static final HttpResponseStatus UNAUTHORIZED
public static final HttpResponseStatus PAYMENT_REQUIRED
public static final HttpResponseStatus FORBIDDEN
public static final HttpResponseStatus NOT_FOUND
public static final HttpResponseStatus METHOD_NOT_ALLOWED
public static final HttpResponseStatus NOT_ACCEPTABLE
public static final HttpResponseStatus PROXY_AUTHENTICATION_REQUIRED
public static final HttpResponseStatus REQUEST_TIMEOUT
public static final HttpResponseStatus CONFLICT
public static final HttpResponseStatus GONE
public static final HttpResponseStatus LENGTH_REQUIRED
public static final HttpResponseStatus PRECONDITION_FAILED
public static final HttpResponseStatus REQUEST_ENTITY_TOO_LARGE
public static final HttpResponseStatus REQUEST_URI_TOO_LONG
public static final HttpResponseStatus UNSUPPORTED_MEDIA_TYPE
public static final HttpResponseStatus REQUESTED_RANGE_NOT_SATISFIABLE
public static final HttpResponseStatus EXPECTATION_FAILED
public static final HttpResponseStatus MISDIRECTED_REQUEST
public static final HttpResponseStatus UNPROCESSABLE_ENTITY
public static final HttpResponseStatus LOCKED
public static final HttpResponseStatus FAILED_DEPENDENCY
public static final HttpResponseStatus UNORDERED_COLLECTION
public static final HttpResponseStatus UPGRADE_REQUIRED
public static final HttpResponseStatus PRECONDITION_REQUIRED
public static final HttpResponseStatus TOO_MANY_REQUESTS
public static final HttpResponseStatus REQUEST_HEADER_FIELDS_TOO_LARGE
public static final HttpResponseStatus INTERNAL_SERVER_ERROR
public static final HttpResponseStatus NOT_IMPLEMENTED
public static final HttpResponseStatus BAD_GATEWAY
public static final HttpResponseStatus SERVICE_UNAVAILABLE
public static final HttpResponseStatus GATEWAY_TIMEOUT
public static final HttpResponseStatus HTTP_VERSION_NOT_SUPPORTED
public static final HttpResponseStatus VARIANT_ALSO_NEGOTIATES
public static final HttpResponseStatus INSUFFICIENT_STORAGE
public static final HttpResponseStatus NOT_EXTENDED
public static final HttpResponseStatus NETWORK_AUTHENTICATION_REQUIRED
public HttpResponseStatus(int code, String reasonPhrase)
code
and its reasonPhrase
.public static HttpResponseStatus valueOf(int code)
HttpResponseStatus
represented by the specified code.
If the specified code is a standard HTTP status code, a cached instance
will be returned. Otherwise, a new instance will be returned.public static HttpResponseStatus valueOf(int code, String reasonPhrase)
HttpResponseStatus
represented by the specified code
and reasonPhrase
.
If the specified code is a standard HTTP status code
and reasonPhrase
, a cached instance
will be returned. Otherwise, a new instance will be returned.code
- The response code value.reasonPhrase
- The response code reason phrase.HttpResponseStatus
represented by the specified code
and reasonPhrase
.public static HttpResponseStatus parseLine(CharSequence line)
HttpResponseStatus
. The expected formats of the line are:
statusCode
(e.g. 200)statusCode
reasonPhrase
(e.g. 404 Not Found)IllegalArgumentException
- if the specified status line is malformedpublic static HttpResponseStatus parseLine(String line)
HttpResponseStatus
. The expected formats of the line are:
statusCode
(e.g. 200)statusCode
reasonPhrase
(e.g. 404 Not Found)IllegalArgumentException
- if the specified status line is malformedpublic static HttpResponseStatus parseLine(AsciiString line)
HttpResponseStatus
. The expected formats of the line are:
statusCode
(e.g. 200)statusCode
reasonPhrase
(e.g. 404 Not Found)IllegalArgumentException
- if the specified status line is malformedpublic int code()
HttpResponseStatus
.public AsciiString codeAsText()
AsciiString
.public String reasonPhrase()
HttpResponseStatus
.public HttpStatusClass codeClass()
HttpResponseStatus
public boolean equals(Object o)
HttpResponseStatus
only depends on code()
. The
reason phrase is not considered for equality.public int compareTo(HttpResponseStatus o)
HttpResponseStatus
only depends on code()
. The
reason phrase is not considered for equality.compareTo
in interface Comparable<HttpResponseStatus>
Copyright © 2008–2024 The Netty Project. All rights reserved.