Package org.jboss.resteasy.reactive
Enum Class RestResponse.Status
- All Implemented Interfaces:
jakarta.ws.rs.core.Response.StatusType
,Serializable
,Comparable<RestResponse.Status>
,Constable
- Enclosing class:
- RestResponse<T>
public static enum RestResponse.Status
extends Enum<RestResponse.Status>
implements jakarta.ws.rs.core.Response.StatusType
Commonly used status codes defined by HTTP, see
{@link <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10">HTTP/1.1 documentation}
for the complete list. Additional status codes can be added by applications
by creating an implementation of
Response.StatusType
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription202 Accepted, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.3">HTTP/1.1 documentation}.502 Bad Gateway, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.3">HTTP/1.1 documentation}.400 Bad Request, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.1">HTTP/1.1 documentation}.409 Conflict, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.8">HTTP/1.1 documentation}.100 Continue, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.2.1">HTTP/1.1 documentation}.201 Created, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.2">HTTP/1.1 documentation}.417 Expectation Failed, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.14">HTTP/1.1 documentation}.403 Forbidden, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.3">HTTP/1.1 documentation}.302 Found, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.3">HTTP/1.1 documentation}.504 Gateway Timeout, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.5">HTTP/1.1 documentation}.410 Gone, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.9">HTTP/1.1 documentation}.505 HTTP Version Not Supported, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.6">HTTP/1.1 documentation}.500 Internal Server Error, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.1">HTTP/1.1 documentation}.411 Length Required, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.10">HTTP/1.1 documentation}.405 Method Not Allowed, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.5">HTTP/1.1 documentation}.301 Moved Permanently, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.2">HTTP/1.1 documentation}.300 Multiple Choices, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.1">HTTP/1.1 documentation}.511 Network Authentication Required, see {@link <a href="https://tools.ietf.org/html/rfc6585#section-6">RFC 6585: Additional HTTP Status Codes}.204 No Content, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.5">HTTP/1.1 documentation}.203 Non-Authoritative Information, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.4">HTTP/1.1 documentation}.406 Not Acceptable, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.6">HTTP/1.1 documentation}.404 Not Found, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.4">HTTP/1.1 documentation}.501 Not Implemented, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.2">HTTP/1.1 documentation}.304 Not Modified, see {@link <a href="https://tools.ietf.org/html/rfc7232#section-4.1">HTTP/1.1 documentation}.200 OK, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">HTTP/1.1 documentation}.206 Reset Content, see {@link <a href="https://tools.ietf.org/html/rfc7233#section-4.1">HTTP/1.1 documentation}.413 Payload Too Large, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.11">HTTP/1.1 documentation}.402 Payment Required, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.2">HTTP/1.1 documentation}.308 Permanent Redirect, see {@link <a href="https://tools.ietf.org/html/rfc7238#section-3">HTTP/1.1 documentation}.412 Precondition Failed, see {@link <a href="https://tools.ietf.org/html/rfc7232#section-4.2">HTTP/1.1 documentation}.428 Precondition required, see {@link <a href="https://tools.ietf.org/html/rfc6585#section-3">RFC 6585: Additional HTTP Status Codes}.407 Proxy Authentication Required, see {@link <a href="https://tools.ietf.org/html/rfc7235#section-3.2">HTTP/1.1 documentation}.431 Request Header Fields Too Large, see {@link <a href="https://tools.ietf.org/html/rfc6585#section-5">RFC 6585: Additional HTTP Status Codes}.408 Request Timeout, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.7">HTTP/1.1 documentation}.416 Requested Range Not Satisfiable, see {@link <a href="https://tools.ietf.org/html/rfc7233#section-4.4">HTTP/1.1 documentation}.205 Reset Content, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.5">HTTP/1.1 documentation}.303 See Other, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.4">HTTP/1.1 documentation}.503 Service Unavailable, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.4">HTTP/1.1 documentation}.101 Switching Protocols, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.2.2">HTTP/1.1 documentation}.307 Temporary Redirect, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.7">HTTP/1.1 documentation}.429 Too Many Requests, see {@link <a href="https://tools.ietf.org/html/rfc6585#section-4">RFC 6585: Additional HTTP Status Codes}.401 Unauthorized, see {@link <a href="https://tools.ietf.org/html/rfc7235#section-3.1">HTTP/1.1 documentation}.415 Unsupported Media Type, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.13">HTTP/1.1 documentation}.426 Upgrade Required, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.15">HTTP/1.1 documentation}.414 URI Too Long, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.12">HTTP/1.1 documentation}.305 Use Proxy, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.5">HTTP/1.1 documentation}. -
Method Summary
Modifier and TypeMethodDescriptionstatic RestResponse.Status
fromStatusCode
(int statusCode) Convert a numerical status code into the corresponding Status.jakarta.ws.rs.core.Response.Status.Family
Get the class of status code.Get the reason phrase.int
Get the associated status code.toString()
Get the reason phrase.static RestResponse.Status
Returns the enum constant of this class with the specified name.static RestResponse.Status[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from interface jakarta.ws.rs.core.Response.StatusType
toEnum
-
Enum Constant Details
-
CONTINUE
100 Continue, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.2.1">HTTP/1.1 documentation}. -
SWITCHING_PROTOCOLS
101 Switching Protocols, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.2.2">HTTP/1.1 documentation}. -
OK
200 OK, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">HTTP/1.1 documentation}. -
CREATED
201 Created, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.2">HTTP/1.1 documentation}. -
ACCEPTED
202 Accepted, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.3">HTTP/1.1 documentation}. -
NON_AUTHORITATIVE_INFORMATION
203 Non-Authoritative Information, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.4">HTTP/1.1 documentation}. -
NO_CONTENT
204 No Content, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.5">HTTP/1.1 documentation}. -
RESET_CONTENT
205 Reset Content, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.3.5">HTTP/1.1 documentation}. -
PARTIAL_CONTENT
206 Reset Content, see {@link <a href="https://tools.ietf.org/html/rfc7233#section-4.1">HTTP/1.1 documentation}. -
MULTIPLE_CHOICES
300 Multiple Choices, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.1">HTTP/1.1 documentation}. -
MOVED_PERMANENTLY
301 Moved Permanently, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.2">HTTP/1.1 documentation}. -
FOUND
302 Found, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.3">HTTP/1.1 documentation}. -
SEE_OTHER
303 See Other, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.4">HTTP/1.1 documentation}. -
NOT_MODIFIED
304 Not Modified, see {@link <a href="https://tools.ietf.org/html/rfc7232#section-4.1">HTTP/1.1 documentation}. -
USE_PROXY
305 Use Proxy, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.5">HTTP/1.1 documentation}. -
TEMPORARY_REDIRECT
307 Temporary Redirect, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.4.7">HTTP/1.1 documentation}. -
PERMANENT_REDIRECT
308 Permanent Redirect, see {@link <a href="https://tools.ietf.org/html/rfc7238#section-3">HTTP/1.1 documentation}. -
BAD_REQUEST
400 Bad Request, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.1">HTTP/1.1 documentation}. -
UNAUTHORIZED
401 Unauthorized, see {@link <a href="https://tools.ietf.org/html/rfc7235#section-3.1">HTTP/1.1 documentation}. -
PAYMENT_REQUIRED
402 Payment Required, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.2">HTTP/1.1 documentation}. -
FORBIDDEN
403 Forbidden, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.3">HTTP/1.1 documentation}. -
NOT_FOUND
404 Not Found, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.4">HTTP/1.1 documentation}. -
METHOD_NOT_ALLOWED
405 Method Not Allowed, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.5">HTTP/1.1 documentation}. -
NOT_ACCEPTABLE
406 Not Acceptable, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.6">HTTP/1.1 documentation}. -
PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required, see {@link <a href="https://tools.ietf.org/html/rfc7235#section-3.2">HTTP/1.1 documentation}. -
REQUEST_TIMEOUT
408 Request Timeout, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.7">HTTP/1.1 documentation}. -
CONFLICT
409 Conflict, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.8">HTTP/1.1 documentation}. -
GONE
410 Gone, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.9">HTTP/1.1 documentation}. -
LENGTH_REQUIRED
411 Length Required, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.10">HTTP/1.1 documentation}. -
PRECONDITION_FAILED
412 Precondition Failed, see {@link <a href="https://tools.ietf.org/html/rfc7232#section-4.2">HTTP/1.1 documentation}. -
PAYLOAD_TOO_LARGE
413 Payload Too Large, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.11">HTTP/1.1 documentation}. -
URI_TOO_LONG
414 URI Too Long, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.12">HTTP/1.1 documentation}. -
UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.13">HTTP/1.1 documentation}. -
REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable, see {@link <a href="https://tools.ietf.org/html/rfc7233#section-4.4">HTTP/1.1 documentation}. -
EXPECTATION_FAILED
417 Expectation Failed, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.14">HTTP/1.1 documentation}. -
UPGRADE_REQUIRED
426 Upgrade Required, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.5.15">HTTP/1.1 documentation}. -
PRECONDITION_REQUIRED
428 Precondition required, see {@link <a href="https://tools.ietf.org/html/rfc6585#section-3">RFC 6585: Additional HTTP Status Codes}. -
TOO_MANY_REQUESTS
429 Too Many Requests, see {@link <a href="https://tools.ietf.org/html/rfc6585#section-4">RFC 6585: Additional HTTP Status Codes}. -
REQUEST_HEADER_FIELDS_TOO_LARGE
431 Request Header Fields Too Large, see {@link <a href="https://tools.ietf.org/html/rfc6585#section-5">RFC 6585: Additional HTTP Status Codes}. -
INTERNAL_SERVER_ERROR
500 Internal Server Error, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.1">HTTP/1.1 documentation}. -
NOT_IMPLEMENTED
501 Not Implemented, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.2">HTTP/1.1 documentation}. -
BAD_GATEWAY
502 Bad Gateway, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.3">HTTP/1.1 documentation}. -
SERVICE_UNAVAILABLE
503 Service Unavailable, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.4">HTTP/1.1 documentation}. -
GATEWAY_TIMEOUT
504 Gateway Timeout, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.5">HTTP/1.1 documentation}. -
HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported, see {@link <a href="https://tools.ietf.org/html/rfc7231#section-6.6.6">HTTP/1.1 documentation}. -
NETWORK_AUTHENTICATION_REQUIRED
511 Network Authentication Required, see {@link <a href="https://tools.ietf.org/html/rfc6585#section-6">RFC 6585: Additional HTTP Status Codes}.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getFamily
public jakarta.ws.rs.core.Response.Status.Family getFamily()Get the class of status code.- Specified by:
getFamily
in interfacejakarta.ws.rs.core.Response.StatusType
- Returns:
- the class of status code.
-
getStatusCode
public int getStatusCode()Get the associated status code.- Specified by:
getStatusCode
in interfacejakarta.ws.rs.core.Response.StatusType
- Returns:
- the status code.
-
getReasonPhrase
Get the reason phrase.- Specified by:
getReasonPhrase
in interfacejakarta.ws.rs.core.Response.StatusType
- Returns:
- the reason phrase.
-
toString
Get the reason phrase.- Overrides:
toString
in classEnum<RestResponse.Status>
- Returns:
- the reason phrase.
-
fromStatusCode
Convert a numerical status code into the corresponding Status.- Parameters:
statusCode
- the numerical status code.- Returns:
- the matching Status or null is no matching Status is defined.
-