public static enum Connection.State extends java.lang.Enum<Connection.State>
Enum Constant and Description |
---|
Connected
已连接
|
Connecting
连接中
|
Disconnected
连接断开,之前连接过,现在被主动断开时会有该状态
|
Failed
连接失败,配置错误引起的,可通过绑定
Connection.EVENT_ERROR 事件获取具体错误信息 |
Initialized
初始化
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
java.lang.String |
toString() |
static Connection.State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Connection.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Connection.State Initialized
public static final Connection.State Connecting
public static final Connection.State Connected
public static final Connection.State Failed
Connection.EVENT_ERROR
事件获取具体错误信息public static final Connection.State Disconnected
public static Connection.State[] values()
for (Connection.State c : Connection.State.values()) System.out.println(c);
public static Connection.State valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Enum<Connection.State>