public final class HttpResponseStatus
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HttpResponseStatus.StatusClass
The class of response status codes.
|
Modifier and Type | Method and Description |
---|---|
int |
code()
Get the three digit status-code indicating status of
the response.
|
java.lang.CharSequence |
codeAsCharSequence()
Get the
code() as a CharSequence . |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
static HttpResponseStatus |
of(java.lang.CharSequence statusCode)
Convert from
CharSequence to HttpResponseStatus . |
static HttpResponseStatus |
of(int statusCode,
java.lang.String reasonPhrase)
|
java.lang.String |
reasonPhrase()
Get the reason-phrase that provides a
textual description associated with the numeric status code.
|
HttpResponseStatus.StatusClass |
statusClass()
Get the
HttpResponseStatus.StatusClass for this HttpResponseStatus . |
java.lang.String |
toString() |
void |
writeTo(Buffer buffer)
Write the equivalent of this
HttpResponseStatus to a Buffer . |
public static final HttpResponseStatus CONTINUE
public static final HttpResponseStatus SWITCHING_PROTOCOLS
public static final HttpResponseStatus PROCESSING
public static final HttpResponseStatus EARLY_HINTS
public static final HttpResponseStatus OK
public static final HttpResponseStatus CREATED
public static final HttpResponseStatus ACCEPTED
public static final HttpResponseStatus NON_AUTHORITATIVE_INFORMATION
public static final HttpResponseStatus NO_CONTENT
public static final HttpResponseStatus RESET_CONTENT
public static final HttpResponseStatus PARTIAL_CONTENT
public static final HttpResponseStatus MULTI_STATUS
public static final HttpResponseStatus ALREADY_REPORTED
public static final HttpResponseStatus IM_USED
public static final HttpResponseStatus MULTIPLE_CHOICES
public static final HttpResponseStatus MOVED_PERMANENTLY
public static final HttpResponseStatus FOUND
public static final HttpResponseStatus SEE_OTHER
public static final HttpResponseStatus NOT_MODIFIED
public static final HttpResponseStatus USE_PROXY
public static final HttpResponseStatus TEMPORARY_REDIRECT
public static final HttpResponseStatus PERMANENT_REDIRECT
public static final HttpResponseStatus BAD_REQUEST
public static final HttpResponseStatus UNAUTHORIZED
public static final HttpResponseStatus PAYMENT_REQUIRED
public static final HttpResponseStatus FORBIDDEN
public static final HttpResponseStatus NOT_FOUND
public static final HttpResponseStatus METHOD_NOT_ALLOWED
public static final HttpResponseStatus NOT_ACCEPTABLE
public static final HttpResponseStatus PROXY_AUTHENTICATION_REQUIRED
public static final HttpResponseStatus REQUEST_TIMEOUT
public static final HttpResponseStatus CONFLICT
public static final HttpResponseStatus GONE
public static final HttpResponseStatus LENGTH_REQUIRED
public static final HttpResponseStatus PRECONDITION_FAILED
public static final HttpResponseStatus PAYLOAD_TOO_LARGE
public static final HttpResponseStatus URI_TOO_LONG
public static final HttpResponseStatus UNSUPPORTED_MEDIA_TYPE
public static final HttpResponseStatus RANGE_NOT_SATISFIABLE
public static final HttpResponseStatus EXPECTATION_FAILED
public static final HttpResponseStatus MISDIRECTED_REQUEST
public static final HttpResponseStatus UNPROCESSABLE_ENTITY
public static final HttpResponseStatus LOCKED
public static final HttpResponseStatus FAILED_DEPENDENCY
public static final HttpResponseStatus TOO_EARLY
public static final HttpResponseStatus UPGRADE_REQUIRED
public static final HttpResponseStatus PRECONDITION_REQUIRED
public static final HttpResponseStatus TOO_MANY_REQUESTS
public static final HttpResponseStatus REQUEST_HEADER_FIELDS_TOO_LARGE
public static final HttpResponseStatus UNAVAILABLE_FOR_LEGAL_REASONS
public static final HttpResponseStatus INTERNAL_SERVER_ERROR
public static final HttpResponseStatus NOT_IMPLEMENTED
public static final HttpResponseStatus BAD_GATEWAY
public static final HttpResponseStatus SERVICE_UNAVAILABLE
public static final HttpResponseStatus GATEWAY_TIMEOUT
public static final HttpResponseStatus HTTP_VERSION_NOT_SUPPORTED
public static final HttpResponseStatus VARIANT_ALSO_NEGOTIATES
public static final HttpResponseStatus INSUFFICIENT_STORAGE
public static final HttpResponseStatus LOOP_DETECTED
public static final HttpResponseStatus NOT_EXTENDED
public static final HttpResponseStatus NETWORK_AUTHENTICATION_REQUIRED
public static HttpResponseStatus of(int statusCode, java.lang.String reasonPhrase)
HttpResponseStatus
for the specified statusCode
and reasonPhrase
.
Generally, the constants in HttpResponseStatus
should be used.statusCode
- the three digit status-code
indicating status of the responsereasonPhrase
- the reason-phrase
portion of the responseHttpResponseStatus
public static HttpResponseStatus of(java.lang.CharSequence statusCode)
CharSequence
to HttpResponseStatus
.statusCode
- The CharSequence
to convert, this is expected to be an integer value.HttpResponseStatus
representation of statusCode
.public int code()
public java.lang.CharSequence codeAsCharSequence()
code()
as a CharSequence
.code()
as a CharSequence
.public java.lang.String reasonPhrase()
public void writeTo(Buffer buffer)
HttpResponseStatus
to a Buffer
.buffer
- The Buffer
to write topublic HttpResponseStatus.StatusClass statusClass()
HttpResponseStatus.StatusClass
for this HttpResponseStatus
.HttpResponseStatus.StatusClass
for this HttpResponseStatus
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object