public enum ResponseStatus extends java.lang.Enum<ResponseStatus>
Enum Constant and Description |
---|
Accepted
202 - Request was accepted.
|
BadRequest
400 - Request was not correct.
|
Conflict
409 - Request conflicts with the current state of the server
|
Created
201 - Resource was created.
|
Forbidden
403 - Request forbidden
|
Gone
410 Gone - Resource has been deleted or has expired.
|
InsufficientCapacity
507 - Insufficient capacity to complete the request.
|
InternalServerError
500 - Internal server failure resulted in request not being honored.
|
MethodNotAllowed
405 Method Not Allowed - Method in request is not allowed on the resource
|
NotFound
404 Not Found - Resource was not found.
|
NotModified
304 Not Modified
|
Ok
200 OK - Resource found and all good.
|
PartialContent
206 - Partial content.
|
PreconditionFailed
412 Precondition Failed - The conditions given in the request header fields evaluated to false
|
ProxyAuthenticationRequired
407 - Proxy authentication required
|
RangeNotSatisfiable
416 Range Not Satisfiable - A range request is invalid or outside of the bounds of an object.
|
RequestTooLarge
413 Request Entity Too Large - The request is larger than what the server is willing to accept
|
ServiceUnavailable
503 - Service is unavailable
|
TooManyRequests
429 Application rate limit exceeded/Application quota limit exceeded.
|
Unauthorized
401 - Request Unauthorized
|
Modifier and Type | Method and Description |
---|---|
static ResponseStatus |
getResponseStatus(RestServiceErrorCode restServiceErrorCode)
Gets the ResponseStatus that corresponds to the
restServiceErrorCode . |
int |
getStatusCode() |
boolean |
isClientError() |
boolean |
isRedirection() |
boolean |
isServerError() |
boolean |
isSuccess() |
static ResponseStatus |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ResponseStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResponseStatus Ok
public static final ResponseStatus Created
public static final ResponseStatus Accepted
public static final ResponseStatus PartialContent
public static final ResponseStatus NotModified
public static final ResponseStatus BadRequest
public static final ResponseStatus Unauthorized
public static final ResponseStatus Forbidden
public static final ResponseStatus NotFound
public static final ResponseStatus MethodNotAllowed
public static final ResponseStatus ProxyAuthenticationRequired
public static final ResponseStatus Conflict
public static final ResponseStatus Gone
public static final ResponseStatus PreconditionFailed
public static final ResponseStatus RequestTooLarge
public static final ResponseStatus RangeNotSatisfiable
public static final ResponseStatus TooManyRequests
public static final ResponseStatus InternalServerError
public static final ResponseStatus ServiceUnavailable
public static final ResponseStatus InsufficientCapacity
public static ResponseStatus[] values()
for (ResponseStatus c : ResponseStatus.values()) System.out.println(c);
public static ResponseStatus 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 int getStatusCode()
ResponseStatus
public boolean isSuccess()
true
if status code is 2xx which means success. false
otherwise.public boolean isRedirection()
true
if status code is 3xx which means redirection. false
otherwise.public boolean isClientError()
true
if status code is 4xx which means client error. false
otherwise.public boolean isServerError()
true
if status code is 5xx which means server error. false
otherwise.public static ResponseStatus getResponseStatus(RestServiceErrorCode restServiceErrorCode)
restServiceErrorCode
.restServiceErrorCode
- the input RestServiceErrorCode
.restServiceErrorCode
belongs to.