public enum ErrorStatuses extends Enum<ErrorStatuses> implements ErrorStatus
ErrorStatus
, which is the interface required by
ServiceException
. It provides a default set of ErrorStatus
constants.
Additional ErrorStatus
can be defined, by either implementing
classes, which implement ErrorStatus
or by defining an additional
enum, which again implements the interface and defines further constants.Modifier and Type | Method and Description |
---|---|
int |
getCode() |
int |
getHttpStatus() |
static ErrorStatuses |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ErrorStatuses[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ErrorStatuses BAD_REQUEST
public static final ErrorStatuses UNAUTHORIZED
public static final ErrorStatuses FORBIDDEN
public static final ErrorStatuses NOT_FOUND
public static final ErrorStatuses METHOD_NOT_ALLOWED
public static final ErrorStatuses NOT_ACCEPTABLE
public static final ErrorStatuses CONFLICT
public static final ErrorStatuses GONE
public static final ErrorStatuses PRECONDITION_FAILED
public static final ErrorStatuses UNSUPPORTED_MEDIA_TYPE
public static final ErrorStatuses MISDIRECTED_REQUEST
public static final ErrorStatuses UNPROCESSABLE_ENTITY
public static final ErrorStatuses LOCKED
public static final ErrorStatuses PRECONDITION_REQUIRED
public static final ErrorStatuses SERVER_ERROR
public static final ErrorStatuses NOT_IMPLEMENTED
public static final ErrorStatuses BAD_GATEWAY
public static final ErrorStatuses GATEWAY_TIMEOUT
public static final ErrorStatuses CONSTRAINT_VIOLATED
public static final ErrorStatuses VALUE_REQUIRED
public static final ErrorStatuses NO_ON_HANDLER
public static final ErrorStatuses EVENT_MISMATCH
public static final ErrorStatuses MODEL_MISMATCH
public static ErrorStatuses[] values()
for (ErrorStatuses c : ErrorStatuses.values()) System.out.println(c);
public static ErrorStatuses valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getCode()
getCode
in interface ErrorStatus
public int getHttpStatus()
getHttpStatus
in interface ErrorStatus
Copyright © 2020. All rights reserved.