enum ConnectionState extends Enum<ConnectionState>
| 枚举常量和说明 |
|---|
AWAITING_CHUNK
Connected and awaiting HttpContent chunk.
|
AWAITING_INITIAL
Connected and awaiting initial message (e.g.
|
AWAITING_PROXY_AUTHENTICATION
Connected but waiting for proxy authentication.
|
CONNECTING
Connection attempting to connect.
|
DISCONNECT_REQUESTED
We've asked the client to disconnect, but it hasn't yet.
|
DISCONNECTED
Disconnected
|
HANDSHAKING
In the middle of doing an SSL handshake.
|
| 限定符和类型 | 字段和说明 |
|---|---|
private boolean |
partOfConnectionFlow |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
isDisconnectingOrDisconnected()
Indicates whether this ConnectionState is no longer waiting for messages and is either in the process of
disconnecting or is already disconnected.
|
boolean |
isPartOfConnectionFlow()
Indicates whether this ConnectionState corresponds to a step in a
ConnectionFlow. |
static ConnectionState |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static ConnectionState[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ConnectionState CONNECTING
public static final ConnectionState HANDSHAKING
public static final ConnectionState AWAITING_PROXY_AUTHENTICATION
public static final ConnectionState AWAITING_INITIAL
public static final ConnectionState AWAITING_CHUNK
public static final ConnectionState DISCONNECT_REQUESTED
public static final ConnectionState DISCONNECTED
public static ConnectionState[] values()
for (ConnectionState c : ConnectionState.values()) System.out.println(c);
public static ConnectionState valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public boolean isPartOfConnectionFlow()
ConnectionFlow. This is useful to
distinguish so that we know whether or not we're in the process of establishing a connection.public boolean isDisconnectingOrDisconnected()
DISCONNECT_REQUESTED or DISCONNECTED, otherwise falseCopyright © 2021 Zodiac. All rights reserved.