public final class Status extends Metadata
Modifier and Type | Field and Description |
---|---|
static Status |
CLIENT_ERROR_BAD_REQUEST
The request could not be understood by the server due to malformed
syntax.
|
static Status |
CLIENT_ERROR_CONFLICT
The request could not be completed due to a conflict with the current
state of the resource (as experienced in a version control system).
|
static Status |
CLIENT_ERROR_EXPECTATION_FAILED
The user agent expects some behaviour of the server (given in an Expect
request-header field), but this expectation could not be met by this
server.
|
static Status |
CLIENT_ERROR_FAILED_DEPENDENCY
This status code means that the method could not be performed on the
resource because the requested action depended on another action and that
action failed.
|
static Status |
CLIENT_ERROR_FORBIDDEN
The server understood the request, but is refusing to fulfill it as it
could be explained in the entity.
|
static Status |
CLIENT_ERROR_GONE
The requested resource is no longer available at the server and no
forwarding address is known.
|
static Status |
CLIENT_ERROR_LENGTH_REQUIRED
The server refuses to accept the request without a defined
Content-Length.
|
static Status |
CLIENT_ERROR_LOCKED
The source or destination resource of a method is locked (or temporarily
involved in another process).
|
static Status |
CLIENT_ERROR_METHOD_NOT_ALLOWED
The method specified in the Request-Line is not allowed for the resource
identified by the Request-URI.
|
static Status |
CLIENT_ERROR_NOT_ACCEPTABLE
The resource identified by the request is only capable of generating
response entities whose content characteristics do not match the user's
requirements (in Accept* headers).
|
static Status |
CLIENT_ERROR_NOT_FOUND
The server has not found anything matching the Request-URI or the server
does not wish to reveal exactly why the request has been refused, or no
other response is applicable.
|
static Status |
CLIENT_ERROR_PAYMENT_REQUIRED
This code is reserved for future use.
|
static Status |
CLIENT_ERROR_PRECONDITION_FAILED
Sent by the server when the user agent asks the server to carry out a
request under certain conditions that are not met.
|
static Status |
CLIENT_ERROR_PROXY_AUTHENTIFICATION_REQUIRED
This code is similar to 401 (Unauthorized), but indicates that the client
must first authenticate itself with the proxy.
|
static Status |
CLIENT_ERROR_REQUEST_ENTITY_TOO_LARGE
The server is refusing to process a request because the request entity is
larger than the server is willing or able to process.
|
static Status |
CLIENT_ERROR_REQUEST_TIMEOUT
Sent by the server when an HTTP client opens a connection, but has never
sent a request (or never sent the blank line that signals the end of the
request).
|
static Status |
CLIENT_ERROR_REQUEST_URI_TOO_LONG
The server is refusing to service the request because the Request-URI is
longer than the server is willing to interpret.
|
static Status |
CLIENT_ERROR_REQUESTED_RANGE_NOT_SATISFIABLE
The request includes a Range request-header field and the selected
resource is too small for any of the byte-ranges to apply.
|
static Status |
CLIENT_ERROR_UNAUTHORIZED
The request requires user authentication.
|
static Status |
CLIENT_ERROR_UNPROCESSABLE_ENTITY
This status code means the server understands the content type of the
request entity (syntactically correct) but was unable to process the
contained instructions.
|
static Status |
CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE
The server is refusing to service the request because the entity of the
request is in a format not supported by the requested resource for the
requested method.
|
static Status |
CONNECTOR_ERROR_COMMUNICATION
A client connector faces an error during the communication with the
remote server (interruption, timeout, etc).
|
static Status |
CONNECTOR_ERROR_CONNECTION
A client connector can not connect to the remote server.
|
static Status |
CONNECTOR_ERROR_INTERNAL
Generic status code sent by a client connector when an error occurs
during the process of a request to its server or the process of a
response to its client.
|
static Status |
INFO_CONTINUE
This interim response (the client has to wait for the final response) is
used to inform the client that the initial part of the request has been
received and has not yet been rejected or completed by the server.
|
static Status |
INFO_PROCESSING
This interim response is used to inform the client that the server has
accepted the complete request, but has not yet completed it since the
server has a reasonable expectation that the request will take
significant time to complete.
|
static Status |
INFO_SWITCHING_PROTOCOL
The server understands and is willing to comply with the client's
request, via the Upgrade message header field, for a change in the
application protocol being used on this connection.
|
static Status |
REDIRECTION_FOUND
The requested resource resides temporarily under a different URI which
should not be used for future requests by the client (use status codes
303 or 307 instead since this status has been manifestly misused).
|
static Status |
REDIRECTION_MULTIPLE_CHOICES
The server lets the user agent choosing one of the multiple
representations of the requested resource, each representation having its
own specific location provided in the response entity.
|
static Status |
REDIRECTION_NOT_MODIFIED
Status code sent by the server in response to a conditional GET request
in case the document has not been modified.
|
static Status |
REDIRECTION_PERMANENT
The requested resource has been assigned a new permanent URI and any
future references to this resource SHOULD use one of the returned URIs.
|
static Status |
REDIRECTION_SEE_OTHER
The response to the request can be found under a different URI and SHOULD
be retrieved using a GET method on that resource.
|
static Status |
REDIRECTION_TEMPORARY
The requested resource resides temporarily under a different URI which
should not be used for future requests by the client.
|
static Status |
REDIRECTION_USE_PROXY
The requested resource MUST be accessed through the proxy given by the
Location field.
|
static Status |
SERVER_ERROR_BAD_GATEWAY
The server, while acting as a gateway or proxy, received an invalid
response from the upstream server it accessed in attempting to fulfill
the request.
|
static Status |
SERVER_ERROR_GATEWAY_TIMEOUT
The server, while acting as a gateway or proxy, could not connect to the
upstream server.
|
static Status |
SERVER_ERROR_INSUFFICIENT_STORAGE
This status code means the method could not be performed on the resource
because the server is unable to store the representation needed to
successfully complete the request.
|
static Status |
SERVER_ERROR_INTERNAL
The server encountered an unexpected condition which prevented it from
fulfilling the request.
|
static Status |
SERVER_ERROR_NOT_IMPLEMENTED
The server does not support the functionality required to fulfill the
request.
|
static Status |
SERVER_ERROR_SERVICE_UNAVAILABLE
The server is currently unable to handle the request due to a temporary
overloading or maintenance of the server.
|
static Status |
SERVER_ERROR_VERSION_NOT_SUPPORTED
The server does not support, or refuses to support, the HTTP protocol
version that was used in the request message.
|
static Status |
SUCCESS_ACCEPTED
The request has been accepted for processing, but the processing has not
been completed.
|
static Status |
SUCCESS_CREATED
The request has been fulfilled and resulted in a new resource being
created.
|
static Status |
SUCCESS_MULTI_STATUS
This response is used to inform the client that the HTTP response entity
contains a set of status codes generated during the method invocation.
|
static Status |
SUCCESS_NO_CONTENT
The server has fulfilled the request but does not need to return an
entity-body (for example after a DELETE), and might want to return
updated metainformation.
|
static Status |
SUCCESS_NON_AUTHORITATIVE
The request has succeeded but the returned metainformation in the
entity-header do not come from the origin server, but is gathered from a
local or a third-party copy.
|
static Status |
SUCCESS_OK
The request has succeeded.
|
static Status |
SUCCESS_PARTIAL_CONTENT
The server has fulfilled the partial GET request for the resource
assuming the request has included a Range header field indicating the
desired range.
|
static Status |
SUCCESS_RESET_CONTENT
The server has fulfilled the request and the user agent SHOULD reset the
document view which caused the request to be sent.
|
Constructor and Description |
---|
Status(int code)
Constructor.
|
Status(int code,
java.lang.String name,
java.lang.String description,
java.lang.String uri)
Constructor.
|
Status(Status status,
java.lang.String description)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object)
Indicates if the status is equal to a given one.
|
int |
getCode()
Returns the corresponding code (HTTP or WebDAV or custom code).
|
java.lang.String |
getDescription()
Returns the description.
|
java.lang.String |
getName()
Returns the name of this status.
|
java.lang.String |
getUri()
Returns the URI of the specification describing the status.
|
int |
hashCode() |
boolean |
isClientError()
Indicates if the status is a client error status.
|
static boolean |
isClientError(int code)
Indicates if the status is a client error status.
|
boolean |
isConnectorError()
Indicates if the status is a connector error status.
|
static boolean |
isConnectorError(int code)
Indicates if the status is a connector error status.
|
boolean |
isError()
Indicates if the status is an error (client or server) status.
|
static boolean |
isError(int code)
Indicates if the status is an error (client or server) status.
|
boolean |
isInfo()
Indicates if the status is an information status.
|
static boolean |
isInfo(int code)
Indicates if the status is an information status.
|
boolean |
isRedirection()
Indicates if the status is a redirection status.
|
static boolean |
isRedirection(int code)
Indicates if the status is a redirection status.
|
boolean |
isServerError()
Indicates if the status is a server error status.
|
static boolean |
isServerError(int code)
Indicates if the status is a server error status.
|
boolean |
isSuccess()
Indicates if the status is a success status.
|
static boolean |
isSuccess(int code)
Indicates if the status is a success status.
|
java.lang.String |
toString()
Returns the name of the status followed by its HTTP code.
|
static Status |
valueOf(int code)
Returns the status associated to a code.
|
public static final Status INFO_CONTINUE
public static final Status INFO_SWITCHING_PROTOCOL
public static final Status INFO_PROCESSING
public static final Status SUCCESS_OK
public static final Status SUCCESS_CREATED
public static final Status SUCCESS_ACCEPTED
public static final Status SUCCESS_NON_AUTHORITATIVE
public static final Status SUCCESS_NO_CONTENT
public static final Status SUCCESS_RESET_CONTENT
public static final Status SUCCESS_PARTIAL_CONTENT
public static final Status SUCCESS_MULTI_STATUS
public static final Status REDIRECTION_MULTIPLE_CHOICES
public static final Status REDIRECTION_PERMANENT
public static final Status REDIRECTION_FOUND
public static final Status REDIRECTION_SEE_OTHER
public static final Status REDIRECTION_NOT_MODIFIED
public static final Status REDIRECTION_USE_PROXY
public static final Status REDIRECTION_TEMPORARY
public static final Status CLIENT_ERROR_BAD_REQUEST
public static final Status CLIENT_ERROR_UNAUTHORIZED
public static final Status CLIENT_ERROR_PAYMENT_REQUIRED
public static final Status CLIENT_ERROR_FORBIDDEN
public static final Status CLIENT_ERROR_NOT_FOUND
public static final Status CLIENT_ERROR_METHOD_NOT_ALLOWED
public static final Status CLIENT_ERROR_NOT_ACCEPTABLE
public static final Status CLIENT_ERROR_PROXY_AUTHENTIFICATION_REQUIRED
public static final Status CLIENT_ERROR_REQUEST_TIMEOUT
public static final Status CLIENT_ERROR_CONFLICT
public static final Status CLIENT_ERROR_GONE
public static final Status CLIENT_ERROR_LENGTH_REQUIRED
public static final Status CLIENT_ERROR_PRECONDITION_FAILED
public static final Status CLIENT_ERROR_REQUEST_ENTITY_TOO_LARGE
public static final Status CLIENT_ERROR_REQUEST_URI_TOO_LONG
public static final Status CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE
public static final Status CLIENT_ERROR_REQUESTED_RANGE_NOT_SATISFIABLE
public static final Status CLIENT_ERROR_EXPECTATION_FAILED
public static final Status CLIENT_ERROR_UNPROCESSABLE_ENTITY
public static final Status CLIENT_ERROR_LOCKED
public static final Status CLIENT_ERROR_FAILED_DEPENDENCY
public static final Status SERVER_ERROR_INTERNAL
public static final Status SERVER_ERROR_NOT_IMPLEMENTED
public static final Status SERVER_ERROR_BAD_GATEWAY
public static final Status SERVER_ERROR_SERVICE_UNAVAILABLE
public static final Status SERVER_ERROR_GATEWAY_TIMEOUT
public static final Status SERVER_ERROR_VERSION_NOT_SUPPORTED
public static final Status SERVER_ERROR_INSUFFICIENT_STORAGE
public static final Status CONNECTOR_ERROR_CONNECTION
public static final Status CONNECTOR_ERROR_COMMUNICATION
public static final Status CONNECTOR_ERROR_INTERNAL
public Status(int code)
code
- The specification code.public Status(int code, java.lang.String name, java.lang.String description, java.lang.String uri)
code
- The specification code.name
- The name.description
- The description.uri
- The URI of the specification describing the method.public Status(Status status, java.lang.String description)
status
- The status to copy.description
- The description to associate.public static boolean isClientError(int code)
code
- The code of the status.public static boolean isConnectorError(int code)
code
- The code of the status.public static boolean isError(int code)
code
- The code of the status.public static boolean isInfo(int code)
code
- The code of the status.public static boolean isRedirection(int code)
code
- The code of the status.public static boolean isServerError(int code)
code
- The code of the status.public static boolean isSuccess(int code)
code
- The code of the status.public static Status valueOf(int code)
code
- The code.public boolean equals(java.lang.Object object)
public int getCode()
public java.lang.String getDescription()
getDescription
in class Metadata
public java.lang.String getName()
public java.lang.String getUri()
public boolean isClientError()
public boolean isConnectorError()
public boolean isError()
public boolean isInfo()
public boolean isRedirection()
public boolean isServerError()
public boolean isSuccess()