- All Implemented Interfaces:
Serializable
,Comparable<HttpSuccessCode>
,Constable
,org.refcodes.mixin.StatusCodeAccessor<Integer>
public enum HttpSuccessCode
extends Enum<HttpSuccessCode>
implements org.refcodes.mixin.StatusCodeAccessor<Integer>
Only the Success 2xx codes as of (from) the
HttpStatusCode
enumeration.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.refcodes.mixin.StatusCodeAccessor
org.refcodes.mixin.StatusCodeAccessor.StatusCodeBuilder<SC extends Object,
B extends org.refcodes.mixin.StatusCodeAccessor.StatusCodeBuilder<SC, B>>, org.refcodes.mixin.StatusCodeAccessor.StatusCodeMutator<SC extends Object>, org.refcodes.mixin.StatusCodeAccessor.StatusCodeProperty<SC extends Object> -
Enum Constant Summary
Enum ConstantDescription202 Accepted (HTTP/1.0 - RFC 1945)201 Created (HTTP/1.0 - RFC 1945)207 Multi-Status (WebDAV - RFC 2518) or 207 Partial Update OK (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)204 No Content (HTTP/1.0 - RFC 1945)203 Non Authoritative Information (HTTP/1.1 - RFC 2616)200 OK (HTTP/1.0 - RFC 1945)206 Partial Content (HTTP/1.1 - RFC 2616)205 Reset Content (HTTP/1.1 - RFC 2616) -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpSuccessCode
toHttpSuccessCode
(int aHttpStatusCode) Determines the HTTP success code from the given value by evaluating thegetStatusCode()
property.static HttpSuccessCode
toHttpSuccessCode
(org.refcodes.mixin.StatusCodeAccessor<Integer> aHttpStatusCode) Determines the HTTP success code from the given HTTP Status-Code property by evaluating thegetStatusCode()
property.static HttpSuccessCode
Returns the enum constant of this class with the specified name.static HttpSuccessCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OK
200 OK (HTTP/1.0 - RFC 1945) -
CREATED
201 Created (HTTP/1.0 - RFC 1945) -
ACCEPTED
202 Accepted (HTTP/1.0 - RFC 1945) -
NON_AUTHORITATIVE_INFORMATION
203 Non Authoritative Information (HTTP/1.1 - RFC 2616) -
NO_CONTENT
204 No Content (HTTP/1.0 - RFC 1945) -
RESET_CONTENT
205 Reset Content (HTTP/1.1 - RFC 2616) -
PARTIAL_CONTENT
206 Partial Content (HTTP/1.1 - RFC 2616) -
MULTI_STATUS
207 Multi-Status (WebDAV - RFC 2518) or 207 Partial Update OK (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getStatusCode
- Specified by:
getStatusCode
in interfaceorg.refcodes.mixin.StatusCodeAccessor<Integer>
-
toHttpSuccessCode
Determines the HTTP success code from the given value by evaluating thegetStatusCode()
property.- Parameters:
aHttpStatusCode
- The code from which to get theHttpStatusCode
element.- Returns:
- The according
HttpStatusCode
element or null if none was found.
-
toHttpSuccessCode
public static HttpSuccessCode toHttpSuccessCode(org.refcodes.mixin.StatusCodeAccessor<Integer> aHttpStatusCode) Determines the HTTP success code from the given HTTP Status-Code property by evaluating thegetStatusCode()
property.- Parameters:
aHttpStatusCode
- The code property from whichStatusCodeAccessor.getStatusCode()
to get theHttpStatusCode
element.- Returns:
- The according
HttpStatusCode
element or null if none was found.
-