- All Implemented Interfaces:
Serializable
,Comparable<Status>
,Constable
Enumeration of HTTP statuses as defined by RFC 7231 Section 6.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Describes the category of an HTTP status as defined by RFC 7231 Section 6.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicates that a request was cancelled during processing by the server. -
Method Summary
Modifier and TypeMethodDescriptionReturns the category of the HTTP status.int
getCode()
Returns the code of the HTTP status.Returns the reason phrase associated to the HTTP status.static Status
valueOf
(int code) Returns the HTTP status corresponding to the specified code.static Status
Returns the enum constant of this class with the specified name.static Status[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONTINUE
-
SWITCHING_PROTOCOLS
-
OK
-
CREATED
-
ACCEPTED
-
NON_AUTHORITATIVE_INFORMATION
-
NO_CONTENT
-
RESET_CONTENT
-
PARTIAL_CONTENT
-
MULTIPLE_CHOICES
-
MOVED_PERMANENTLY
-
FOUND
-
SEE_OTHER
-
NOT_MODIFIED
-
USE_PROXY
-
TEMPORARY_REDIRECT
-
BAD_REQUEST
-
UNAUTHORIZED
-
PAYMENT_REQUIRED
-
FORBIDDEN
-
NOT_FOUND
-
METHOD_NOT_ALLOWED
-
NOT_ACCEPTABLE
-
PROXY_AUTHENTICATION_REQUIRED
-
REQUEST_TIMEOUT
-
CONFLICT
-
GONE
-
LENGTH_REQUIRED
-
PRECONDITION_FAILED
-
PAYLOAD_TOO_LARGE
-
URI_TOO_LONG
-
UNSUPPORTED_MEDIA_TYPE
-
RANGE_NOT_SATISFIABLE
-
EXPECTATION_FAILED
-
UPGRADE_REQUIRED
-
TOO_MANY_REQUESTS
-
INTERNAL_SERVER_ERROR
-
NOT_IMPLEMENTED
-
BAD_GATEWAY
-
SERVICE_UNAVAILABLE
-
GATEWAY_TIMEOUT
-
HTTP_VERSION_NOT_SUPPORTED
-
CANCELLED_REQUEST
Indicates that a request was cancelled during processing by the server.
-
-
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
-
getCode
public int getCode()Returns the code of the HTTP status.
- Returns:
- a HTTP status code
-
getReasonPhrase
Returns the reason phrase associated to the HTTP status.
- Returns:
- a reason phrase
-
getCategory
Returns the category of the HTTP status.
- Returns:
- the HTTP status category
-
valueOf
Returns the HTTP status corresponding to the specified code.
- Parameters:
code
- an HTTP code- Returns:
- an HTTP status
- Throws:
IllegalArgumentException
- if the specified status doesn't correspond to a known HTTP status
-