Enum Class PlatformResultCode
- All Implemented Interfaces:
Serializable,Comparable<PlatformResultCode>,Constable
平台操作的结果码
表达"平台侧发生了什么",与协议层的 HTTP-like 状态码完全无关:
这里不出现 400 / 404 / 500 之类的概念,也不带任何 int / string 序列化字段。
把结果码翻译成协议状态是 Api 层的职责。
不依赖 Protocol:本枚举不得引用 ProtocolException、Response
或任何协议类型。
- Since:
- 0.7.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription其它失败参数不合法目标玩家不存在操作成功平台不支持该能力 -
Method Summary
Modifier and TypeMethodDescriptionstatic PlatformResultCodeReturns the enum constant of this class with the specified name.static PlatformResultCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
操作成功 -
PLAYER_NOT_FOUND
目标玩家不存在由平台在查找阶段判定;与"请求里没给目标"(
INVALID_ARGUMENT)是两回事。 -
INVALID_ARGUMENT
参数不合法例如命令内容为空。属于调用方的问题。
-
UNSUPPORTED
平台不支持该能力典型场景:平台没有覆盖标题 / ActionBar 等可选原语。
-
FAILED
其它失败平台侧执行时发生的、无法归入以上分类的错误。
-
-
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
-