Http.ResponseStatuspublic static enum Http.Status extends java.lang.Enum<Http.Status> implements Http.ResponseStatus
Http.ResponseStatus.
Copied from JAX-RS.
Http.ResponseStatus.Family| Modifier and Type | Method | Description |
|---|---|---|
int |
code() |
Get the associated status code.
|
Http.ResponseStatus.Family |
family() |
Get the class of status code.
|
static java.util.Optional<Http.Status> |
of(int statusCode) |
Convert a numerical status code into the corresponding
Status enum value. |
java.lang.String |
reasonPhrase() |
Get the reason phrase.
|
java.lang.String |
toString() |
Get the response status as string.
|
static Http.Status |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static Http.Status[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOffrom, frompublic static final Http.Status OK_200
public static final Http.Status CREATED_201
public static final Http.Status ACCEPTED_202
public static final Http.Status NO_CONTENT_204
public static final Http.Status RESET_CONTENT_205
public static final Http.Status PARTIAL_CONTENT_206
public static final Http.Status MOVED_PERMANENTLY_301
public static final Http.Status FOUND_302
public static final Http.Status SEE_OTHER_303
public static final Http.Status NOT_MODIFIED_304
public static final Http.Status USE_PROXY_305
public static final Http.Status TEMPORARY_REDIRECT_307
public static final Http.Status BAD_REQUEST_400
public static final Http.Status UNAUTHORIZED_401
public static final Http.Status PAYMENT_REQUIRED_402
public static final Http.Status FORBIDDEN_403
public static final Http.Status NOT_FOUND_404
public static final Http.Status METHOD_NOT_ALLOWED_405
public static final Http.Status NOT_ACCEPTABLE_406
public static final Http.Status PROXY_AUTHENTICATION_REQUIRED_407
public static final Http.Status REQUEST_TIMEOUT_408
public static final Http.Status CONFLICT_409
public static final Http.Status GONE_410
public static final Http.Status LENGTH_REQUIRED_411
public static final Http.Status PRECONDITION_FAILED_412
public static final Http.Status REQUEST_ENTITY_TOO_LARGE_413
public static final Http.Status REQUEST_URI_TOO_LONG_414
public static final Http.Status UNSUPPORTED_MEDIA_TYPE_415
public static final Http.Status REQUESTED_RANGE_NOT_SATISFIABLE_416
public static final Http.Status EXPECTATION_FAILED_417
public static final Http.Status INTERNAL_SERVER_ERROR_500
public static final Http.Status NOT_IMPLEMENTED_501
public static final Http.Status BAD_GATEWAY_502
public static final Http.Status SERVICE_UNAVAILABLE_503
public static final Http.Status GATEWAY_TIMEOUT_504
public static final Http.Status HTTP_VERSION_NOT_SUPPORTED
public static Http.Status[] values()
for (Http.Status c : Http.Status.values()) System.out.println(c);
public static Http.Status valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic Http.ResponseStatus.Family family()
family in interface Http.ResponseStatuspublic int code()
code in interface Http.ResponseStatuspublic java.lang.String reasonPhrase()
reasonPhrase in interface Http.ResponseStatuspublic java.lang.String toString()
toString in class java.lang.Enum<Http.Status>"Status-Code SP Reason-Phrase".public static java.util.Optional<Http.Status> of(int statusCode)
Status enum value.
As opposed to Http.ResponseStatus.from(int), this method returns no value
for an unknown status code not represented by a value in this enumeration of standard HTTP response status codes.
statusCode - the numerical status code.Status value is defined.Copyright © 2018 Oracle Corporation. All rights reserved.