public final class StatusLineHttpStatus extends java.lang.Object implements HttpStatus
HttpStatus that's derived from an HTTP status line.
TODO: validate the given status line
ACCEPTED, BAD_GATEWAY, BAD_REQUEST, CONFLICT, CONTINUE, CREATED, EXPECTATION_FAILED, FAILED_DEPENDENCY, FORBIDDEN, FOUND, GATEWAY_TIMEOUT, GONE, HTTP_VERSION_NOT_SUPPORTED, INSUFFICIENT_STORAGE, INTERNAL_SERVER_ERROR, LENGTH_REQUIRED, LOCKED, METHOD_NOT_ALLOWED, MOVED_PERMANENTLY, MULTIPLE_CHOICES, MULTISTATUS, NO_CONTENT, NON_AUTHORITATIVE_INFORMATION, NONE, NOT_ACCEPTABLE, NOT_FOUND, NOT_IMPLEMENTED, NOT_MODIFIED, OK, PARTIAL_CONTENT, PAYLOAD_TOO_LARGE, PAYMENT_REQUIRED, PERMANENT_REDIRECT, PRECONDITION_FAILED, PROCESSING, PROXY_AUTHENTICATION_REQUIRED, REQUEST_ENTITY_TOO_LARGE, REQUEST_TIMEOUT, REQUEST_URI_TOO_LONG, RESET_CONTENT, SEE_OTHER, SERVICE_UNAVAILABLE, SWITCHING_PROTOCOLS, TEMPORARY_REDIRECT, UNAUTHORIZED, UNPROCESSABLE_ENTITY, UNSUPPORTED_MEDIA_TYPE, UPGRADE_REQUIRED, URI_TOO_LONG, USE_PROXY, VARIANT_ALSO_NEGOTIATES| Constructor and Description |
|---|
StatusLineHttpStatus(java.lang.String statusLine)
Creates an HttpStatus object from a given status line
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isClientError()
Returns whether this status represents a client error status code.
|
boolean |
isInformational()
Returns whether this represents an informational status code.
|
boolean |
isRedirect()
Returns whether this status represents a redirection status code.
|
boolean |
isServerError()
Returns whether this status represents a server error status code.
|
boolean |
isSuccess()
Returns whether this status represents a success status code.
|
java.lang.String |
reason()
Returns the reason phrase of this status code.
|
int |
statusCode()
Returns the status code.
|
public StatusLineHttpStatus(java.lang.String statusLine)
statusLine - The status line.public int statusCode()
HttpStatusstatusCode in interface HttpStatuspublic java.lang.String reason()
HttpStatusNote: the reason phrase doesn't contain the status code itself.
reason in interface HttpStatusnull if the status code is unknown.public boolean isInformational()
HttpStatusisInformational in interface HttpStatustrue if this represents an informational status code, false otherwise.public boolean isSuccess()
HttpStatusisSuccess in interface HttpStatustrue if this represents a success status code, false otherwise.public boolean isRedirect()
HttpStatusisRedirect in interface HttpStatustrue if this represents a redirection status code, false otherwise.public boolean isClientError()
HttpStatusisClientError in interface HttpStatustrue if this represents a client error status code, false otherwise.public boolean isServerError()
HttpStatusisServerError in interface HttpStatustrue if this represents a server error status code, false otherwise.public int hashCode()
hashCode in interface HttpStatushashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in interface HttpStatusequals in class java.lang.Object