JavaScript is disabled on your browser.
Enum Constant Summary
Enum Constants
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
int
boolean
boolean
boolean
Returns the enum constant of this class with the specified name.
Returns an array containing the constants of this enum class, in
the order they are declared.
Methods inherited from class java.lang.Enum
clone , compareTo , describeConstable , equals , finalize , getDeclaringClass , hashCode , name , ordinal , toString , valueOf
Enum Constant Details
SUCCESS
public static final ApiCode SUCCESS
REDIRECT
public static final ApiCode REDIRECT
BAD_REQUEST
public static final ApiCode BAD_REQUEST
PARAMETER_PARSE_EXCEPTION
public static final ApiCode PARAMETER_PARSE_EXCEPTION
PARAMETER_EXCEPTION
public static final ApiCode PARAMETER_EXCEPTION
VALIDATE_FAILED
public static final ApiCode VALIDATE_FAILED
AUTHENTICATION_EXCEPTION
public static final ApiCode AUTHENTICATION_EXCEPTION
UNAUTHORIZED
public static final ApiCode UNAUTHORIZED
NOT_PERMISSION
public static final ApiCode NOT_PERMISSION
NOT_FOUND
public static final ApiCode NOT_FOUND
NOT_FOUND_DATA
public static final ApiCode NOT_FOUND_DATA
METHOD_NOT_SUPPORT
public static final ApiCode METHOD_NOT_SUPPORT
NOT_ACCEPTABLE
public static final ApiCode NOT_ACCEPTABLE
REQUEST_ENTITY_TOO_LARGE
public static final ApiCode REQUEST_ENTITY_TOO_LARGE
REQUEST_URL_TOO_LONG
public static final ApiCode REQUEST_URL_TOO_LONG
REQUEST_TOO_MANY
public static final ApiCode REQUEST_TOO_MANY
SIGNATURE_ERROR
public static final ApiCode SIGNATURE_ERROR
NOT_IMPLEMENTED
public static final ApiCode NOT_IMPLEMENTED
SYSTEM_EXCEPTION
public static final ApiCode SYSTEM_EXCEPTION
DATABASE_EXCEPTION
public static final ApiCode DATABASE_EXCEPTION
ELASTICSEARCH_EXCEPTION
public static final ApiCode ELASTICSEARCH_EXCEPTION
SYSTEM_BUSY
public static final ApiCode SYSTEM_BUSY
VISITOR_TOO_MANY
public static final ApiCode VISITOR_TOO_MANY
THREAD_POOL_OVERFLOW
public static final ApiCode THREAD_POOL_OVERFLOW
NO_PROVIDER
public static final ApiCode NO_PROVIDER
PROVIDER_EXCEPTION
public static final ApiCode PROVIDER_EXCEPTION
GATEWAY_TIMEOUT
public static final ApiCode GATEWAY_TIMEOUT
REQUEST_TIMEOUT
public static final ApiCode REQUEST_TIMEOUT
BUSINESS_EXCEPTION
public static final ApiCode BUSINESS_EXCEPTION
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 name
NullPointerException - if the argument is null
getApiCode
public static ApiCode getApiCode (int code)
根据状态码获取枚举
Parameters:
code - 状态码
Returns:
ApiCode枚举
isSuccess
public boolean isSuccess ()
判断是否为成功状态码
Returns:
是否成功
isClientError
public boolean isClientError ()
判断是否为客户端错误
Returns:
是否为客户端错误
isServerError
public boolean isServerError ()
判断是否为服务端错误
Returns:
是否为服务端错误
getCode
public int getCode ()
获取状态码
Returns:
状态码值
getMsg
获取信息内容
Returns:
信息内容
getMsgFriendly
public String getMsgFriendly ()