Package net.aifusion.cimserver
Enum HttpStatus
- All Implemented Interfaces:
Serializable
,Comparable<HttpStatus>
,java.lang.constant.Constable
Enumeration to manage HTTP status values
- Author:
- Sharad Singhal
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription202 - Accepted400 - bad request409 - Conflict100 - Continue201 - Created403 - Forbidden504 - Gateway Timeout500 - Internal Server Error411 - Length required405 - Method not allowed204 - No Content203 - Non Authoritative Information406 - Not acceptable404 - Not Found501 - Not Implemented304 - Not Modified200 - OK206 - Partial Content413 - Payload too large416 - Range Not Satisfiable301 - Moved Permanently408 - Request Timeout205 - Reset Content503 - Service Unavailable101 - Switching Protocols401 - Unauthorized505 - Http version not supported415 - Unsupported Media Type414 - URI too long -
Method Summary
Modifier and TypeMethodDescriptioncode()
Code associated with this statusDescription associated with this statusstatic HttpStatus
lookup
(int status) Look up the status associated with a status codetoString()
static HttpStatus
Returns the enum constant of this type with the specified name.static HttpStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
-
Enum Constant Details
-
CONTINUE
100 - Continue -
SWITCH_PROTOCOL
101 - Switching Protocols -
OK
200 - OK -
CREATED
201 - Created -
ACCEPTED
202 - Accepted -
NON_AUTHORITATIVE_INFORMATION
203 - Non Authoritative Information -
NO_CONTENT
204 - No Content -
RESET_CONTENT
205 - Reset Content -
PARTIAL_CONTENT
206 - Partial Content -
REDIRECT
301 - Moved Permanently -
NOT_MODIFIED
304 - Not Modified -
BAD_REQUEST
400 - bad request -
UNAUTHORIZED
401 - Unauthorized -
FORBIDDEN
403 - Forbidden -
NOT_FOUND
404 - Not Found -
METHOD_NOT_ALLOWED
405 - Method not allowed -
NOT_ACCEPTABLE
406 - Not acceptable -
REQUEST_TIMEOUT
408 - Request Timeout -
CONFLICT
409 - Conflict -
LENGTH_REQUIRED
411 - Length required -
PAYLOAD_TOO_LARGE
413 - Payload too large -
URI_TOO_LONG
414 - URI too long -
UNSUPPORTED_MEDIA_TYPE
415 - Unsupported Media Type -
RANGE_NOT_SATISFIABLE
416 - Range Not Satisfiable -
INTERNAL_ERROR
500 - Internal Server Error -
NOT_IMPLEMENTED
501 - Not Implemented -
SERVICE_UNAVAILABLE
503 - Service Unavailable -
GATEWAY_TIMEOUT
504 - Gateway Timeout -
UNSUPPORTED_HTTP_VERSION
505 - Http version not supported
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
code
Code associated with this status- Returns:
- - code for this status
-
description
Description associated with this status- Returns:
- - description for this status
-
lookup
Look up the status associated with a status code- Parameters:
status
- - integer code value (e.g., 200)- Returns:
- - HTTP Status
-
toString
- Overrides:
toString
in classEnum<HttpStatus>
-