Enum ConnectionState

java.lang.Object
java.lang.Enum<ConnectionState>
org.littleshoot.proxy.impl.ConnectionState
All Implemented Interfaces:
Serializable, Comparable<ConnectionState>, java.lang.constant.Constable

enum ConnectionState extends Enum<ConnectionState>
  • Enum Constant Details

    • CONNECTING

      public static final ConnectionState CONNECTING
      Connection attempting to connect.
    • HANDSHAKING

      public static final ConnectionState HANDSHAKING
      In the middle of doing an SSL handshake.
    • NEGOTIATING_CONNECT

      public static final ConnectionState NEGOTIATING_CONNECT
      In the process of negotiating an HTTP CONNECT from the client.
    • AWAITING_CONNECT_OK

      public static final ConnectionState AWAITING_CONNECT_OK
      When forwarding a CONNECT to a chained proxy, we await the CONNECTION_OK message from the proxy.
    • AWAITING_PROXY_AUTHENTICATION

      public static final ConnectionState AWAITING_PROXY_AUTHENTICATION
      Connected but waiting for proxy authentication.
    • AWAITING_INITIAL

      public static final ConnectionState AWAITING_INITIAL
      Connected and awaiting initial message (e.g. HttpRequest or HttpResponse).
    • AWAITING_CHUNK

      public static final ConnectionState AWAITING_CHUNK
      Connected and awaiting HttpContent chunk.
    • DISCONNECT_REQUESTED

      public static final ConnectionState DISCONNECT_REQUESTED
      We've asked the client to disconnect, but it hasn't yet.
    • DISCONNECTED

      public static final ConnectionState DISCONNECTED
      Disconnected
  • Field Details

    • partOfConnectionFlow

      private final boolean partOfConnectionFlow
  • Constructor Details

    • ConnectionState

      private ConnectionState(boolean partOfConnectionFlow)
    • ConnectionState

      private ConnectionState()
  • Method Details

    • values

      public static ConnectionState[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ConnectionState valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • isPartOfConnectionFlow

      public boolean isPartOfConnectionFlow()
      Indicates whether this ConnectionState corresponds to a step in a ConnectionFlow. This is useful to distinguish so that we know whether or not we're in the process of establishing a connection.
      Returns:
      true if part of connection flow, otherwise false
    • isDisconnectingOrDisconnected

      public boolean isDisconnectingOrDisconnected()
      Indicates whether this ConnectionState is no longer waiting for messages and is either in the process of disconnecting or is already disconnected.
      Returns:
      true if the connection state is DISCONNECT_REQUESTED or DISCONNECTED, otherwise false