Package org.swisspush.gateleen.core.util
Enum StatusCode
- java.lang.Object
-
- java.lang.Enum<StatusCode>
-
- org.swisspush.gateleen.core.util.StatusCode
-
- All Implemented Interfaces:
Serializable,Comparable<StatusCode>
public enum StatusCode extends Enum<StatusCode>
Enum for HTTP status codes- Author:
- https://github.com/mcweba [Marc-Andre Weber]
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StatusCodefromCode(int code)Returns the enum StatusCode which matches the specified http status code.intgetStatusCode()StringgetStatusMessage()StringtoString()static StatusCodevalueOf(String name)Returns the enum constant of this type with the specified name.static StatusCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONTINUE
public static final StatusCode CONTINUE
-
SWITCHING_PROTOCOLS
public static final StatusCode SWITCHING_PROTOCOLS
-
EARLY_HINTS
public static final StatusCode EARLY_HINTS
-
OK
public static final StatusCode OK
-
CREATED
public static final StatusCode CREATED
-
ACCEPTED
public static final StatusCode ACCEPTED
-
NON_AUTHORITATIVE_INFORMATION
public static final StatusCode NON_AUTHORITATIVE_INFORMATION
-
NO_CONTENT
public static final StatusCode NO_CONTENT
-
RESET_CONTENT
public static final StatusCode RESET_CONTENT
-
PARTIAL_CONTENT
public static final StatusCode PARTIAL_CONTENT
-
MULTIPLE_CHOICES
public static final StatusCode MULTIPLE_CHOICES
-
MOVED_PERMANENTLY
public static final StatusCode MOVED_PERMANENTLY
-
FOUND
public static final StatusCode FOUND
-
SEE_OTHER
public static final StatusCode SEE_OTHER
-
NOT_MODIFIED
public static final StatusCode NOT_MODIFIED
-
TEMPORARY_REDIRECT
public static final StatusCode TEMPORARY_REDIRECT
-
PERMANENT_REDIRECT
public static final StatusCode PERMANENT_REDIRECT
-
BAD_REQUEST
public static final StatusCode BAD_REQUEST
-
UNAUTHORIZED
public static final StatusCode UNAUTHORIZED
-
PAYMENT_REQUIRED
public static final StatusCode PAYMENT_REQUIRED
-
FORBIDDEN
public static final StatusCode FORBIDDEN
-
NOT_FOUND
public static final StatusCode NOT_FOUND
-
METHOD_NOT_ALLOWED
public static final StatusCode METHOD_NOT_ALLOWED
-
NOT_ACCEPTABLE
public static final StatusCode NOT_ACCEPTABLE
-
PROXY_AUTHENTICATION_REQUIRED
public static final StatusCode PROXY_AUTHENTICATION_REQUIRED
-
REQUEST_TIMEOUT
public static final StatusCode REQUEST_TIMEOUT
-
CONFLICT
public static final StatusCode CONFLICT
-
GONE
public static final StatusCode GONE
-
LENGTH_REQUIRED
public static final StatusCode LENGTH_REQUIRED
-
PRECONDITION_FAILED
public static final StatusCode PRECONDITION_FAILED
-
PAYLOAD_TOO_LARGE
public static final StatusCode PAYLOAD_TOO_LARGE
-
URI_TOO_LONG
public static final StatusCode URI_TOO_LONG
-
UNSUPPORTED_MEDIA_TYPE
public static final StatusCode UNSUPPORTED_MEDIA_TYPE
-
RANGE_NOT_SATISFIABLE
public static final StatusCode RANGE_NOT_SATISFIABLE
-
EXPECTATION_FAILED
public static final StatusCode EXPECTATION_FAILED
-
I_AM_A_TEAPOT
public static final StatusCode I_AM_A_TEAPOT
-
MISDIRECTED_REQUEST
public static final StatusCode MISDIRECTED_REQUEST
-
UNPROCESSABLE_CONTENT
public static final StatusCode UNPROCESSABLE_CONTENT
-
LOCKED
public static final StatusCode LOCKED
-
FAILED_DEPENDENCY
public static final StatusCode FAILED_DEPENDENCY
-
TOO_EARLY
public static final StatusCode TOO_EARLY
-
UPGRADE_REQUIRED
public static final StatusCode UPGRADE_REQUIRED
-
PRECONDITION_REQUIRED
public static final StatusCode PRECONDITION_REQUIRED
-
TOO_MANY_REQUESTS
public static final StatusCode TOO_MANY_REQUESTS
-
REQUEST_HEADER_FIELDS_TOO_LARGE
public static final StatusCode REQUEST_HEADER_FIELDS_TOO_LARGE
-
Unavailable_For_Legal_Reasons
public static final StatusCode Unavailable_For_Legal_Reasons
-
INTERNAL_SERVER_ERROR
public static final StatusCode INTERNAL_SERVER_ERROR
-
NOT_IMPLEMENTED
public static final StatusCode NOT_IMPLEMENTED
-
BAD_GATEWAY
public static final StatusCode BAD_GATEWAY
-
SERVICE_UNAVAILABLE
public static final StatusCode SERVICE_UNAVAILABLE
-
TIMEOUT
public static final StatusCode TIMEOUT
-
HTTP_VERSION_NOT_SUPPORTED
public static final StatusCode HTTP_VERSION_NOT_SUPPORTED
-
VARIANT_ALSO_NEGOTIATES
public static final StatusCode VARIANT_ALSO_NEGOTIATES
-
INSUFFICIENT_STORAGE
public static final StatusCode INSUFFICIENT_STORAGE
-
LOOP_DETECTED
public static final StatusCode LOOP_DETECTED
-
NOT_EXTENDED
public static final StatusCode NOT_EXTENDED
-
Network_Authentication_Required
public static final StatusCode Network_Authentication_Required
-
-
Method Detail
-
values
public static StatusCode[] 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 (StatusCode c : StatusCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StatusCode 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
-
getStatusCode
public int getStatusCode()
-
getStatusMessage
public String getStatusMessage()
-
toString
public String toString()
- Overrides:
toStringin classEnum<StatusCode>
-
fromCode
public static StatusCode fromCode(int code)
Returns the enum StatusCode which matches the specified http status code.- Parameters:
code- code- Returns:
- The matching StatusCode or null if none matches.
-
-