Package tech.xmagic.enums
Enum Class RCH
- All Implemented Interfaces:
Serializable,Comparable<RCH>,Constable,ResultCode
返回结果枚举
配合自定义异常使用
- Since:
- 2021.7.26
- Version:
- 2023.0.0
- Author:
- meng2c
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHttpException成功 -
Field Summary
Fields inherited from interface tech.xmagic.core.ResultCode
SUCCESS -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()返回结果码getMsg()返回提示信息static RCHgetRCH(int code) 获取响应结果枚举static RCH获取响应结果枚举booleanstatic RCHReturns the enum constant of this class with the specified name.static RCH[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HTTP_1XX
HttpException -
HTTP_CONTINUE
-
HTTP_SWITCHING_PROTOCOLS
-
HTTP_PROCESSING
-
HTTP_EARLY_HINTS
-
HTTP_2XX
-
HTTP_OK
成功 -
HTTP_CREATED
-
HTTP_ACCEPTED
-
HTTP_NON_AUTHORITATIVE_INFORMATION
-
HTTP_NO_CONTENT
-
HTTP_RESET_CONTENT
-
HTTP_PARTIAL_CONTENT
-
HTTP_MULTI_STATUS
-
HTTP_ALREADY_REPORTED
-
HTTP_IM_USED
-
HTTP_3XX
-
HTTP_MULTIPLE_CHOICES
-
HTTP_MOVED_PERMANENTLY
-
HTTP_FOUND
-
HTTP_SEE_OTHER
-
HTTP_NOT_MODIFIED
-
HTTP_USE_PROXY
-
HTTP_TEMPORARY_REDIRECT
-
HTTP_PERMANENT_REDIRECT
-
HTTP_4XX
-
HTTP_BAD_REQUEST
-
HTTP_UNAUTHORIZED
-
HTTP_PAYMENT_REQUIRED
-
HTTP_FORBIDDEN
-
HTTP_NOT_FOUND
-
HTTP_METHOD_NOT_ALLOWED
-
HTTP_NOT_ACCEPTABLE
-
HTTP_PROXY_AUTHENTICATION_REQUIRED
-
HTTP_REQUEST_TIMEOUT
-
HTTP_CONFLICT
-
HTTP_GONE
-
HTTP_LENGTH_REQUIRED
-
HTTP_PRECONDITION_FAILED
-
HTTP_PAYLOAD_TOO_LARGE
-
HTTP_URI_TOO_LONG
-
HTTP_UNSUPPORTED_MEDIA_TYPE
-
HTTP_REQUESTED_RANGE_NOT_SATISFIABLE
-
HTTP_EXPECTATION_FAILED
-
HTTP_I_AM_A_TEAPOT
-
HTTP_INSUFFICIENT_SPACE_ON_RESOURCE
-
HTTP_METHOD_FAILURE
-
HTTP_DESTINATION_LOCKED
-
HTTP_UNPROCESSABLE_ENTITY
-
HTTP_LOCKED
-
HTTP_FAILED_DEPENDENCY
-
HTTP_TOO_EARLY
-
HTTP_UPGRADE_REQUIRED
-
HTTP_PRECONDITION_REQUIRED
-
HTTP_TOO_MANY_REQUESTS
-
HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE
-
HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
-
HTTP_5XX
-
HTTP_INTERNAL_SERVER_ERROR
-
HTTP_NOT_IMPLEMENTED
-
HTTP_BAD_GATEWAY
-
HTTP_SERVICE_UNAVAILABLE
-
HTTP_GATEWAY_TIMEOUT
-
HTTP_HTTP_VERSION_NOT_SUPPORTED
-
HTTP_VARIANT_ALSO_NEGOTIATES
-
HTTP_INSUFFICIENT_STORAGE
-
HTTP_LOOP_DETECTED
-
HTTP_BANDWIDTH_LIMIT_EXCEEDED
-
HTTP_NOT_EXTENDED
-
HTTP_NETWORK_AUTHENTICATION_REQUIRED
-
-
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
-
getCode
public int getCode()Description copied from interface:ResultCode返回结果码- Specified by:
getCodein interfaceResultCode- Returns:
- 结果码
-
getMsg
Description copied from interface:ResultCode返回提示信息- Specified by:
getMsgin interfaceResultCode- Returns:
- 提示信息
-
isSuccess
public boolean isSuccess()- Specified by:
isSuccessin interfaceResultCode
-
getRCH
获取响应结果枚举- Parameters:
code- 错误码- Returns:
- 响应结果枚举
-
getRCH
获取响应结果枚举- Parameters:
name- 错误名- Returns:
- 响应结果枚举
-