enum ConnectionState extends Enum<ConnectionState>
Enum Constant and Description |
---|
AWAITING_CHUNK
Connected and awaiting HttpContent chunk.
|
AWAITING_CONNECT_OK
When forwarding a CONNECT to a chained proxy, we await the CONNECTION_OK
message from the proxy.
|
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.
|
NEGOTIATING_CONNECT
In the process of negotiating an HTTP CONNECT from the client.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
partOfConnectionFlow |
Modifier and Type | Method and Description |
---|---|
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)
Returns the enum constant of this type with the specified name.
|
static ConnectionState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionState CONNECTING
public static final ConnectionState HANDSHAKING
public static final ConnectionState NEGOTIATING_CONNECT
public static final ConnectionState AWAITING_CONNECT_OK
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
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic 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 © 2009–2017 LittleShoot. All rights reserved.