Enum HttpStatus
-
- All Implemented Interfaces:
-
ai.platon.pulsar.common.http.HttpStatusCode,java.io.Serializable,kotlin.Comparable
public enum HttpStatus extends Enum<HttpStatus> implements HttpStatusCode
Enumeration of HTTP status codes.
The HTTP status code series can be retrieved via .series.
- Since:
3.0
Arjen Poutsma
Sebastien Deleuze
Brian Clozel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumHttpStatus.SeriesEnumeration of HTTP status series.
Retrievable via series.
public classHttpStatus.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Integervalueprivate final HttpStatus.Seriesseriesprivate final StringreasonPhraseprivate final Stringnameprivate final Integerordinalprivate final EnumEntries<HttpStatus>entries
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTINUE100 Continue.SWITCHING_PROTOCOLS101 Switching Protocols.PROCESSING102 Processing.EARLY_HINTS103 Early Hints.CHECKPOINT103 Checkpoint.OK200 OK.CREATED201 Created.ACCEPTED202 Accepted.NON_AUTHORITATIVE_INFORMATION203 Non-Authoritative Information.NO_CONTENT204 No Content.RESET_CONTENT205 Reset Content.PARTIAL_CONTENT206 Partial Content.MULTI_STATUS207 Multi-Status.ALREADY_REPORTED208 Already Reported.IM_USED226 IM Used.MULTIPLE_CHOICES300 Multiple Choices.MOVED_PERMANENTLY301 Moved Permanently.FOUND302 Found.MOVED_TEMPORARILY302 Moved Temporarily.SEE_OTHER303 See Other.NOT_MODIFIED304 Not Modified.USE_PROXY305 Use Proxy.TEMPORARY_REDIRECT307 Temporary Redirect.PERMANENT_REDIRECT308 Permanent Redirect.BAD_REQUEST400 Bad Request.UNAUTHORIZED401 Unauthorized.PAYMENT_REQUIRED402 Payment Required.FORBIDDEN403 Forbidden.NOT_FOUND404 Not Found.METHOD_NOT_ALLOWED405 Method Not Allowed.NOT_ACCEPTABLE406 Not Acceptable.PROXY_AUTHENTICATION_REQUIRED407 Proxy Authentication Required.REQUEST_TIMEOUT408 Request Timeout.CONFLICT409 Conflict.GONE410 Gone.LENGTH_REQUIRED411 Length Required.PRECONDITION_FAILED412 Precondition failed.PAYLOAD_TOO_LARGE413 Payload Too Large.REQUEST_ENTITY_TOO_LARGE413 Request Entity Too Large.URI_TOO_LONG414 URI Too Long.REQUEST_URI_TOO_LONG414 Request-URI Too Long.UNSUPPORTED_MEDIA_TYPE415 Unsupported Media Type.REQUESTED_RANGE_NOT_SATISFIABLE416 Requested Range Not Satisfiable.EXPECTATION_FAILED417 Expectation Failed.I_AM_A_TEAPOT418 I'm a teapot.FAILED_DEPENDENCY424 Failed Dependency.TOO_EARLY425 Too Early.UPGRADE_REQUIRED426 Upgrade Required.PRECONDITION_REQUIRED428 Precondition Required.TOO_MANY_REQUESTS429 Too Many Requests.REQUEST_HEADER_FIELDS_TOO_LARGE431 Request Header Fields Too Large.UNAVAILABLE_FOR_LEGAL_REASONS451 Unavailable For Legal Reasons.INTERNAL_SERVER_ERROR500 Internal Server Error.NOT_IMPLEMENTED501 Not Implemented.BAD_GATEWAY502 Bad Gateway.SERVICE_UNAVAILABLE503 Service Unavailable.GATEWAY_TIMEOUT504 Gateway Timeout.HTTP_VERSION_NOT_SUPPORTED505 HTTP Version Not Supported.VARIANT_ALSO_NEGOTIATES506 Variant Also NegotiatesINSUFFICIENT_STORAGE507 Insufficient StorageLOOP_DETECTED508 Loop DetectedBANDWIDTH_LIMIT_EXCEEDED509 Bandwidth Limit ExceededNOT_EXTENDED510 Not ExtendedNETWORK_AUTHENTICATION_REQUIRED511 Network Authentication Required.
-
Method Summary
Modifier and Type Method Description final HttpStatus.Seriesseries()Return the HTTP status series of this status code. Booleanis1xxInformational()Whether this status code is in the Informational class ( 1xx).Booleanis2xxSuccessful()Whether this status code is in the Successful class ( 2xx).Booleanis3xxRedirection()Whether this status code is in the Redirection class ( 3xx).Booleanis4xxClientError()Whether this status code is in the Client Error class ( 4xx).Booleanis5xxServerError()Whether this status code is in the Server Error class ( 5xx).BooleanisError()Whether this status code is in the Client or Server Error class StringtoString()Return a string representation of this status code. final HttpStatusvalueOf(String value)Returns the enum constant of this type with the specified name. final Array<HttpStatus>values()Returns an array containing the constants of this enum type, in the order they're declared. IntegergetValue()Return the integer value of this status code. final HttpStatus.SeriesgetSeries()final StringgetReasonPhrase()Return the reason phrase of this status code. final EnumEntries<HttpStatus>getEntries()Enumeration of HTTP status codes. -
-
Method Detail
-
series
final HttpStatus.Series series()
Return the HTTP status series of this status code.
-
is1xxInformational
Boolean is1xxInformational()
Whether this status code is in the Informational class (
1xx).
-
is2xxSuccessful
Boolean is2xxSuccessful()
Whether this status code is in the Successful class (
2xx).
-
is3xxRedirection
Boolean is3xxRedirection()
Whether this status code is in the Redirection class (
3xx).
-
is4xxClientError
Boolean is4xxClientError()
Whether this status code is in the Client Error class (
4xx).
-
is5xxServerError
Boolean is5xxServerError()
Whether this status code is in the Server Error class (
5xx).
-
valueOf
final HttpStatus valueOf(String value)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
-
values
final Array<HttpStatus> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
getSeries
final HttpStatus.Series getSeries()
-
getReasonPhrase
final String getReasonPhrase()
Return the reason phrase of this status code.
-
getEntries
final EnumEntries<HttpStatus> getEntries()
Enumeration of HTTP status codes.
The HTTP status code series can be retrieved via .series.
- Since:
3.0
-
-
-
-