Enum Class RetCode
- 所有已实现的接口:
Serializable,Comparable<RetCode>,Constable
集成平台业务返回码,取自
RetInfo/RetCode。
语义来自 docs/WebServer/消息外层格式定义/响应格式.xml:
1 成功、0 无匹配记录、-1 用户名密码服务匹配错误、-99 其他错误。
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量枚举常量说明-1:用户名、密码与 Fid/OrderNo 不匹配,属于配置错误。0:条件合法但没有数据,SDK 不视为异常。-99:平台侧其它错误,需要按RetCon文本定位。1:查询命中或推送受理成功。平台返回了未约定的取值,或响应里缺少 RetCode。 -
方法概要
-
枚举常量详细资料
-
SUCCESS
1:查询命中或推送受理成功。 -
NO_MATCH
0:条件合法但没有数据,SDK 不视为异常。 -
AUTH_FAILED
-1:用户名、密码与 Fid/OrderNo 不匹配,属于配置错误。 -
OTHER_ERROR
-99:平台侧其它错误,需要按RetCon文本定位。 -
UNKNOWN
平台返回了未约定的取值,或响应里缺少 RetCode。
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- 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.)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 如果参数为空值
-
code
- 返回:
- 写入报文的原始字符串
-
description
- 返回:
- 中文语义
-
isSuccess
public boolean isSuccess()- 返回:
- 是否代表业务处理成功
-
retryable
public boolean retryable()该错误是否可能由瞬时故障造成。SDK 只在传输层失败(超时、连接重置、HTTP 5xx)时重试;一旦拿到业务返回码就不再重试, 因此本方法对
OTHER_ERROR也返回false。- 返回:
- 恒为
false,保留用于调用方自行决策
-
of
按报文原文解析返回码,空白与未知取值归入UNKNOWN。- 参数:
raw-RetCode节点文本- 返回:
- 对应枚举,不会返回
null
-