- All Implemented Interfaces:
Serializable,Comparable<Status>,Constable
列举了当前所关注的各类状态枚举
当前枚举的各状态机事件在发生后都会及时触发Handler.stateEvent(Session, Status, Throwable)方法。
因此用户在实现的Handler接口中可对自己关心的状态机事件进行处理。
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription服务端接受连接异常协议解码异常 执行Message.decode(ByteBuffer, Session)期间发生未捕获的异常读操作异常 在底层服务执行read操作期间因发生异常情况触发了CompletionHandler.failed(Throwable, Object)读通道已被关闭。内部异常连接已建立并构建Session对象写操作异常。业务处理异常 执行Handler.process(Session, Object)期间发生未捕获的异常拒绝接受连接,仅Server端有效会话关闭成功会话正在关闭中 执行了Session.close(boolean immediate)方法,并且当前还存在待输出的数据 -
Method Summary
-
Enum Constant Details
-
NEW_SESSION
连接已建立并构建Session对象 -
INPUT_SHUTDOWN
读通道已被关闭。 通常由以下几种情况会触发该状态:- 对端主动关闭write通道,致使本通常满足了EOF条件
- 当前Session处理完读操作后检测到自身正处于
SESSION_CLOSING状态
-
PROCESS_EXCEPTION
业务处理异常 执行Handler.process(Session, Object)期间发生未捕获的异常 -
DECODE_EXCEPTION
协议解码异常 执行Message.decode(ByteBuffer, Session)期间发生未捕获的异常 -
INPUT_EXCEPTION
读操作异常 在底层服务执行read操作期间因发生异常情况触发了CompletionHandler.failed(Throwable, Object) -
OUTPUT_EXCEPTION
写操作异常。 在底层服务执行write操作期间因发生异常情况触发了CompletionHandler.failed(Throwable, Object) -
SESSION_CLOSING
会话正在关闭中 执行了Session.close(boolean immediate)方法,并且当前还存在待输出的数据 -
SESSION_CLOSED
会话关闭成功 -
REJECT_ACCEPT
拒绝接受连接,仅Server端有效 -
ACCEPT_EXCEPTION
服务端接受连接异常 -
INTERNAL_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 nameNullPointerException- if the argument is null
-