Package dk.mada.jaxrs.model.api
Enum Class StatusCode
- All Implemented Interfaces:
Serializable
,Comparable<StatusCode>
,Constable
HTTP status codes.
The HttpURLConnection constants in enumeration-form. And then some from
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAlready Reported.Continue.Early hints.Accepted.Bad Gateway.Method Not Allowed.Bad Request.Request Time-Out.Conflict.Created.Special code to hold the state for the OpenApi default entry.Request Entity Too Large.Failed dependency.Forbidden.Gateway Timeout.Gone.Internal Server Error.Length Required.Locked.Moved Permanently.Temporary Redirect.Multiple Choices.No Content.Not Acceptable.Non-Authoritative Information.Not Found.Not Implemented.Not Modified.OK.Partial Content.Payment Required.Precondition Failed.Proxy Authentication Required.Request-URI Too Large.Reset Content.See Other.Temporary Redirect.Unauthorized.Service Unavailable.Unprocessable Entity.Unsupported Media Type.Unused, reserved.Use Proxy.HTTP Version Not Supported.IM Used.Insufficient Storage.Loop Detected.Multi-Status.Network Authentication Required.Not Extended.Permanent Redirect.Precondition Required.Request Header Fields Too Large.Switching Protocols.Too early.Too Many Requests.Unavailable For Legal Reasons.Upgrade Required.Variant Also Negotiates. -
Method Summary
Modifier and TypeMethodDescriptionReturns the code in the same form as expected by OpenApi.static StatusCode
Convert OpenApi wire status code a model StatusCode.static StatusCode
Returns the enum constant of this class with the specified name.static StatusCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HTTP_DEFAULT
Special code to hold the state for the OpenApi default entry.- See Also:
-
CONTINUE
Continue. -
SWITCHING_PROTOCOLS
Switching Protocols. -
EARLY_HINTS
Early hints. -
HTTP_OK
OK. -
HTTP_CREATED
Created. -
HTTP_ACCEPTED
Accepted. -
HTTP_NOT_AUTHORITATIVE
Non-Authoritative Information. -
HTTP_NO_CONTENT
No Content. -
HTTP_RESET
Reset Content. -
HTTP_PARTIAL
Partial Content. -
MULTI_STATUS
Multi-Status. -
ALREADY_REPORTED
Already Reported. -
IM_USED
IM Used. -
HTTP_MULT_CHOICE
Multiple Choices. -
HTTP_MOVED_PERM
Moved Permanently. -
HTTP_MOVED_TEMP
Temporary Redirect. -
HTTP_SEE_OTHER
See Other. -
HTTP_NOT_MODIFIED
Not Modified. -
HTTP_USE_PROXY
Use Proxy. -
HTTP_UNUSED
Unused, reserved. -
HTTP_TEMPORARY_REDIRECT
Temporary Redirect. -
PERMANENT_REDIRECT
Permanent Redirect. -
HTTP_BAD_REQUEST
Bad Request. -
HTTP_UNAUTHORIZED
Unauthorized. -
HTTP_PAYMENT_REQUIRED
Payment Required. -
HTTP_FORBIDDEN
Forbidden. -
HTTP_NOT_FOUND
Not Found. -
HTTP_BAD_METHOD
Method Not Allowed. -
HTTP_NOT_ACCEPTABLE
Not Acceptable. -
HTTP_PROXY_AUTH
Proxy Authentication Required. -
HTTP_CLIENT_TIMEOUT
Request Time-Out. -
HTTP_CONFLICT
Conflict. -
HTTP_GONE
Gone. -
HTTP_LENGTH_REQUIRED
Length Required. -
HTTP_PRECON_FAILED
Precondition Failed. -
HTTP_ENTITY_TOO_LARGE
Request Entity Too Large. -
HTTP_REQ_TOO_LONG
Request-URI Too Large. -
HTTP_UNSUPPORTED_TYPE
Unsupported Media Type. -
HTTP_UNPROCESSABLE_ENTITY
Unprocessable Entity. -
HTTP_LOCKED
Locked. -
HTTP_FAILED_DEPENDENCY
Failed dependency. -
TOO_EARLY
Too early. -
UPGRADE_REQUIRED
Upgrade Required. -
PRECONDITION_REQUIRED
Precondition Required. -
TOO_MANY_REQUESTS
Too Many Requests. -
REQUEST_HEADER_FIELDS_TOO_LARGE
Request Header Fields Too Large. -
UNAVAILABLE_FOR_LEGAL_REASONS
Unavailable For Legal Reasons. -
HTTP_INTERNAL_ERROR
Internal Server Error. -
HTTP_NOT_IMPLEMENTED
Not Implemented. -
HTTP_BAD_GATEWAY
Bad Gateway. -
HTTP_UNAVAILABLE
Service Unavailable. -
HTTP_GATEWAY_TIMEOUT
Gateway Timeout. -
HTTP_VERSION
HTTP Version Not Supported. -
VARIANT_ALSO_NEGOTIATES
Variant Also Negotiates. -
INSUFFICIENT_STORAGE
Insufficient Storage. -
LOOP_DETECTED
Loop Detected. -
NOT_EXTENDED
Not Extended. -
NETWORK_AUTHENTICATION_REQUIRED
Network Authentication Required.
-
-
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
-
asOpenApiStatus
Returns the code in the same form as expected by OpenApi. This means that HTTP_DEFAULT is returned as "default", others as their status code in string form.- Returns:
- the OpenApi status code
-
of
Convert OpenApi wire status code a model StatusCode. Note the special handling of "default".- Parameters:
code
- the OpenApi wire-form of a status code- Returns:
- the matching status code
-