Enum Status
- java.lang.Object
-
- java.lang.Enum<Status>
-
- uk.gov.gchq.gaffer.core.exception.Status
-
- All Implemented Interfaces:
Serializable
,Comparable<Status>
public enum Status extends Enum<Status>
Enumerated types for HTTP status codes, loosely based on the JAX-RS 2.0 Status class. Also includes HTTP statuses form the WebDAV HTTP extension.
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Status
fromStatusCode(int statusCode)
Converts a HTTP status code into the matching object.String
getReason()
int
getStatusCode()
String
toString()
static Status
valueOf(String name)
Returns the enum constant of this type with the specified name.static Status[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONTINUE
public static final Status CONTINUE
-
SWITCHING_PROTOCOLS
public static final Status SWITCHING_PROTOCOLS
-
PROCESSING
public static final Status PROCESSING
-
OK
public static final Status OK
-
CREATED
public static final Status CREATED
-
ACCEPTED
public static final Status ACCEPTED
-
NON_AUTHORITATIVE_INFORMATION
public static final Status NON_AUTHORITATIVE_INFORMATION
-
NO_CONTENT
public static final Status NO_CONTENT
-
RESET_CONTENT
public static final Status RESET_CONTENT
-
PARTIAL_CONTENT
public static final Status PARTIAL_CONTENT
-
MULTI_STATUS
public static final Status MULTI_STATUS
-
ALREADY_REPORTED
public static final Status ALREADY_REPORTED
-
IM_USED
public static final Status IM_USED
-
MULTIPLE_CHOICES
public static final Status MULTIPLE_CHOICES
-
MOVED_PERMANENTLY
public static final Status MOVED_PERMANENTLY
-
FOUND
public static final Status FOUND
-
SEE_OTHER
public static final Status SEE_OTHER
-
NOT_MODIFIED
public static final Status NOT_MODIFIED
-
USE_PROXY
public static final Status USE_PROXY
-
SWITCH_PROXY
public static final Status SWITCH_PROXY
-
TEMPORARY_REDIRECT
public static final Status TEMPORARY_REDIRECT
-
PERMANENT_REDIRECT
public static final Status PERMANENT_REDIRECT
-
BAD_REQUEST
public static final Status BAD_REQUEST
-
UNAUTHORIZED
public static final Status UNAUTHORIZED
-
PAYMENT_REQUIRED
public static final Status PAYMENT_REQUIRED
-
FORBIDDEN
public static final Status FORBIDDEN
-
NOT_FOUND
public static final Status NOT_FOUND
-
METHOD_NOT_ALLOWED
public static final Status METHOD_NOT_ALLOWED
-
NOT_ACCEPTABLE
public static final Status NOT_ACCEPTABLE
-
PROXY_AUTHENTICATION_REQUIRED
public static final Status PROXY_AUTHENTICATION_REQUIRED
-
REQUEST_TIMEOUT
public static final Status REQUEST_TIMEOUT
-
CONFLICT
public static final Status CONFLICT
-
GONE
public static final Status GONE
-
LENGTH_REQUIRED
public static final Status LENGTH_REQUIRED
-
PRECONDITION_FAILED
public static final Status PRECONDITION_FAILED
-
REQUEST_ENTITY_TOO_LARGE
public static final Status REQUEST_ENTITY_TOO_LARGE
-
REQUEST_URI_TOO_LONG
public static final Status REQUEST_URI_TOO_LONG
-
UNSUPPORTED_MEDIA_TYPE
public static final Status UNSUPPORTED_MEDIA_TYPE
-
REQUESTED_RANGE_NOT_SATISFIABLE
public static final Status REQUESTED_RANGE_NOT_SATISFIABLE
-
EXPECTATION_FAILED
public static final Status EXPECTATION_FAILED
-
IM_A_TEAPOT
public static final Status IM_A_TEAPOT
-
MISDIRECTED_REQUEST
public static final Status MISDIRECTED_REQUEST
-
UNPROCESSABLE_ENTITY
public static final Status UNPROCESSABLE_ENTITY
-
LOCKED
public static final Status LOCKED
-
FAILED_DEPENDENCY
public static final Status FAILED_DEPENDENCY
-
UPGRADE_REQUIRED
public static final Status UPGRADE_REQUIRED
-
PRECONDITION_REQUIRED
public static final Status PRECONDITION_REQUIRED
-
TOO_MANY_REQUESTS
public static final Status TOO_MANY_REQUESTS
-
REQUEST_HEADER_FIELDS_TOO_LARGE
public static final Status REQUEST_HEADER_FIELDS_TOO_LARGE
-
UNAVAILABLE_FOR_LEGAL_REASONS
public static final Status UNAVAILABLE_FOR_LEGAL_REASONS
-
INTERNAL_SERVER_ERROR
public static final Status INTERNAL_SERVER_ERROR
-
NOT_IMPLEMENTED
public static final Status NOT_IMPLEMENTED
-
BAD_GATEWAY
public static final Status BAD_GATEWAY
-
SERVICE_UNAVAILABLE
public static final Status SERVICE_UNAVAILABLE
-
GATEWAY_TIMEOUT
public static final Status GATEWAY_TIMEOUT
-
HTTP_VERSION_NOT_SUPPORTED
public static final Status HTTP_VERSION_NOT_SUPPORTED
-
-
Method Detail
-
values
public static Status[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Status c : Status.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Status valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
fromStatusCode
public static Status fromStatusCode(int statusCode)
Converts a HTTP status code into the matching object.- Parameters:
statusCode
- the status code to lookup- Returns:
- the corresponding status object
-
getStatusCode
public int getStatusCode()
-
getReason
public String getReason()
-
-