Enum ResponseStatus.Custom
- java.lang.Object
-
- java.lang.Enum<ResponseStatus.Custom>
-
- no.digipost.signature.client.core.internal.http.ResponseStatus.Custom
-
- All Implemented Interfaces:
Serializable
,Comparable<ResponseStatus.Custom>
,javax.ws.rs.core.Response.StatusType
- Enclosing class:
- ResponseStatus
public static enum ResponseStatus.Custom extends Enum<ResponseStatus.Custom> implements javax.ws.rs.core.Response.StatusType
Status codes not part of the JAX-RSResponse.Status
enum.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description UNPROCESSABLE_ENTITY
422 Unprocessable Entity, see https://tools.ietf.org/html/rfc4918#section-11.2
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResponseStatus.Custom
fromStatusCode(int code)
Convert a numerical status code into the corresponding CustomStatus.javax.ws.rs.core.Response.Status.Family
getFamily()
String
getReasonPhrase()
int
getStatusCode()
String
toString()
static ResponseStatus.Custom
valueOf(String name)
Returns the enum constant of this type with the specified name.static ResponseStatus.Custom[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNPROCESSABLE_ENTITY
public static final ResponseStatus.Custom UNPROCESSABLE_ENTITY
422 Unprocessable Entity, see https://tools.ietf.org/html/rfc4918#section-11.2
-
-
Method Detail
-
values
public static ResponseStatus.Custom[] 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 (ResponseStatus.Custom c : ResponseStatus.Custom.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ResponseStatus.Custom 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 ResponseStatus.Custom fromStatusCode(int code)
Convert a numerical status code into the corresponding CustomStatus.- Parameters:
code
- the numerical status code.- Returns:
- the matching Status or null is no matching Status is defined.
-
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCode
in interfacejavax.ws.rs.core.Response.StatusType
-
getFamily
public javax.ws.rs.core.Response.Status.Family getFamily()
- Specified by:
getFamily
in interfacejavax.ws.rs.core.Response.StatusType
-
getReasonPhrase
public String getReasonPhrase()
- Specified by:
getReasonPhrase
in interfacejavax.ws.rs.core.Response.StatusType
-
toString
public String toString()
- Overrides:
toString
in classEnum<ResponseStatus.Custom>
-
-