- All Implemented Interfaces:
- Response.StatusType,- Serializable,- Comparable<Response.Status>,- Constable
- Enclosing class:
- Response
Commonly used status codes defined by HTTP, see
 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 SummaryNested ClassesModifier and TypeClassDescriptionstatic enumAn enumeration representing the class of status code.Nested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescription202 Accepted, see HTTP/1.1 documentation.502 Bad Gateway, see HTTP/1.1 documentation.400 Bad Request, see HTTP/1.1 documentation.409 Conflict, see HTTP/1.1 documentation.201 Created, see HTTP/1.1 documentation.417 Expectation Failed, see HTTP/1.1 documentation.403 Forbidden, see HTTP/1.1 documentation.302 Found, see HTTP/1.1 documentation.504 Gateway Timeout, see HTTP/1.1 documentation.410 Gone, see HTTP/1.1 documentation.505 HTTP Version Not Supported, see HTTP/1.1 documentation.500 Internal Server Error, see HTTP/1.1 documentation.411 Length Required, see HTTP/1.1 documentation.405 Method Not Allowed, see HTTP/1.1 documentation.301 Moved Permanently, see HTTP/1.1 documentation.300 Multiple Choices, see HTTP/1.1: Semantics and Content.511 Network Authentication Required, see RFC 6585: Additional HTTP Status Codes.204 No Content, see HTTP/1.1 documentation.406 Not Acceptable, see HTTP/1.1 documentation.404 Not Found, see HTTP/1.1 documentation.501 Not Implemented, see HTTP/1.1 documentation.304 Not Modified, see HTTP/1.1 documentation.200 OK, see HTTP/1.1 documentation.206 Reset Content, see HTTP/1.1 documentation.402 Payment Required, see HTTP/1.1 documentation.308 Permanent Redirect, see RFC 7538: The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect).412 Precondition Failed, see HTTP/1.1 documentation.428 Precondition required, see RFC 6585: Additional HTTP Status Codes.407 Proxy Authentication Required, see HTTP/1.1 documentation.413 Request Entity Too Large, see HTTP/1.1 documentation.431 Request Header Fields Too Large, see RFC 6585: Additional HTTP Status Codes.408 Request Timeout, see HTTP/1.1 documentation.414 Request-URI Too Long, see HTTP/1.1 documentation.416 Requested Range Not Satisfiable, see HTTP/1.1 documentation.205 Reset Content, see HTTP/1.1 documentation.303 See Other, see HTTP/1.1 documentation.503 Service Unavailable, see HTTP/1.1 documentation.307 Temporary Redirect, see HTTP/1.1 documentation.429 Too Many Requests, see RFC 6585: Additional HTTP Status Codes.401 Unauthorized, see HTTP/1.1 documentation.451 Unavailable For Legal Reasons, see RFC 7725: An HTTP Status Code to Report Legal Obstacles.415 Unsupported Media Type, see HTTP/1.1 documentation.305 Use Proxy, see HTTP/1.1 documentation.
- 
Method SummaryModifier and TypeMethodDescriptionstatic Response.StatusfromStatusCode(int statusCode) Convert a numerical status code into the corresponding Status.Get the class of status code.Get the reason phrase.intGet the associated status code.toString()Get the reason phrase.static Response.StatusReturns the enum constant of this class with the specified name.static Response.Status[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enumclone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface jakarta.ws.rs.core.Response.StatusTypetoEnum
- 
Enum Constant Details- 
OK200 OK, see HTTP/1.1 documentation.
- 
CREATED201 Created, see HTTP/1.1 documentation.
- 
ACCEPTED202 Accepted, see HTTP/1.1 documentation.
- 
NO_CONTENT204 No Content, see HTTP/1.1 documentation.
- 
RESET_CONTENT205 Reset Content, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
PARTIAL_CONTENT206 Reset Content, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
MULTIPLE_CHOICES300 Multiple Choices, see HTTP/1.1: Semantics and Content.- Since:
- 3.1
 
- 
MOVED_PERMANENTLY301 Moved Permanently, see HTTP/1.1 documentation.
- 
FOUND302 Found, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
SEE_OTHER303 See Other, see HTTP/1.1 documentation.
- 
NOT_MODIFIED304 Not Modified, see HTTP/1.1 documentation.
- 
USE_PROXY305 Use Proxy, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
TEMPORARY_REDIRECT307 Temporary Redirect, see HTTP/1.1 documentation.
- 
PERMANENT_REDIRECT308 Permanent Redirect, see RFC 7538: The Hypertext Transfer Protocol Status Code 308 (Permanent Redirect).- Since:
- 3.1
 
- 
BAD_REQUEST400 Bad Request, see HTTP/1.1 documentation.
- 
UNAUTHORIZED401 Unauthorized, see HTTP/1.1 documentation.
- 
PAYMENT_REQUIRED402 Payment Required, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
FORBIDDEN403 Forbidden, see HTTP/1.1 documentation.
- 
NOT_FOUND404 Not Found, see HTTP/1.1 documentation.
- 
METHOD_NOT_ALLOWED405 Method Not Allowed, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
NOT_ACCEPTABLE406 Not Acceptable, see HTTP/1.1 documentation.
- 
PROXY_AUTHENTICATION_REQUIRED407 Proxy Authentication Required, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
REQUEST_TIMEOUT408 Request Timeout, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
CONFLICT409 Conflict, see HTTP/1.1 documentation.
- 
GONE410 Gone, see HTTP/1.1 documentation.
- 
LENGTH_REQUIRED411 Length Required, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
PRECONDITION_FAILED412 Precondition Failed, see HTTP/1.1 documentation.
- 
REQUEST_ENTITY_TOO_LARGE413 Request Entity Too Large, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
REQUEST_URI_TOO_LONG414 Request-URI Too Long, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
UNSUPPORTED_MEDIA_TYPE415 Unsupported Media Type, see HTTP/1.1 documentation.
- 
REQUESTED_RANGE_NOT_SATISFIABLE416 Requested Range Not Satisfiable, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
EXPECTATION_FAILED417 Expectation Failed, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
PRECONDITION_REQUIRED428 Precondition required, see RFC 6585: Additional HTTP Status Codes.- Since:
- 2.1
 
- 
TOO_MANY_REQUESTS429 Too Many Requests, see RFC 6585: Additional HTTP Status Codes.- Since:
- 2.1
 
- 
REQUEST_HEADER_FIELDS_TOO_LARGE431 Request Header Fields Too Large, see RFC 6585: Additional HTTP Status Codes.- Since:
- 2.1
 
- 
UNAVAILABLE_FOR_LEGAL_REASONS451 Unavailable For Legal Reasons, see RFC 7725: An HTTP Status Code to Report Legal Obstacles.- Since:
- 3.1
 
- 
INTERNAL_SERVER_ERROR500 Internal Server Error, see HTTP/1.1 documentation.
- 
NOT_IMPLEMENTED501 Not Implemented, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
BAD_GATEWAY502 Bad Gateway, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
SERVICE_UNAVAILABLE503 Service Unavailable, see HTTP/1.1 documentation.
- 
GATEWAY_TIMEOUT504 Gateway Timeout, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
HTTP_VERSION_NOT_SUPPORTED505 HTTP Version Not Supported, see HTTP/1.1 documentation.- Since:
- 2.0
 
- 
NETWORK_AUTHENTICATION_REQUIRED511 Network Authentication Required, see RFC 6585: Additional HTTP Status Codes.- Since:
- 2.1
 
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
getFamilyGet the class of status code.- Specified by:
- getFamilyin interface- Response.StatusType
- Returns:
- the class of status code.
 
- 
getStatusCodepublic int getStatusCode()Get the associated status code.- Specified by:
- getStatusCodein interface- Response.StatusType
- Returns:
- the status code.
 
- 
getReasonPhraseGet the reason phrase.- Specified by:
- getReasonPhrasein interface- Response.StatusType
- Returns:
- the reason phrase.
 
- 
toStringGet the reason phrase.- Overrides:
- toStringin class- Enum<Response.Status>
- Returns:
- the reason phrase.
 
- 
fromStatusCodeConvert 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.
 
 
-