WsFrameBase.ReadState (Apache Tomcat 10.1.48 API Documentation)
Description: declaration: package: org.apache.tomcat.websocket, class: WsFrameBase, enum: ReadState

# Enum WsFrameBase.ReadState

java.lang.Object
java.lang.Enum<WsFrameBase.ReadState>
org.apache.tomcat.websocket.WsFrameBase.ReadState

All Implemented Interfaces:
  `Serializable, Comparable<WsFrameBase.ReadState>, java.lang.constant.Constable`

Enclosing class:
  `WsFrameBase`

protected static enum WsFrameBase.ReadState extends Enum<WsFrameBase.ReadState>

    WAITING            - not suspended
                         Server case: waiting for a notification that data is ready to be read from the socket, the
                                      socket is registered to the poller
                         Client case: data has been read from the socket and is waiting for data to be processed

    PROCESSING         - not suspended
                         Server case: reading from the socket and processing the data
                         Client case: processing the data if such has already been read and more data will be read
                                      from the socket

    SUSPENDING_WAIT    - suspended, a call to suspend() was made while in WAITING state. A call to resume() will do
                         nothing and will transition to WAITING state

    SUSPENDING_PROCESS - suspended, a call to suspend() was made while in PROCESSING state. A call to resume() will
                         do nothing and will transition to PROCESSING state

    SUSPENDED          - suspended
                         Server case: processing data finished (SUSPENDING_PROCESS) / a notification was received
                                      that data is ready to be read from the socket (SUSPENDING_WAIT), socket is not
                                      registered to the poller
                         Client case: processing data finished (SUSPENDING_PROCESS) / data has been read from the
                                      socket and is available for processing (SUSPENDING_WAIT)
                         A call to resume() will:
                         Server case: register the socket to the poller
                         Client case: resume data processing

    CLOSING            - not suspended, a close will be sent

        resume           data to be        resume
        no action        processed         no action
     |---------------| |---------------| |----------|
     |               v |               v v          |
     |  |----------WAITING«--------PROCESSING----|  |
     |  |             ^   processing             |  |
     |  |             |   finished               |  |
     |  |             |                          |  |
     | suspend        |                     suspend |
     |  |             |                          |  |
     |  |          resume                        |  |
     |  |    register socket to poller (server)  |  |
     |  |    resume data processing (client)     |  |
     |  |             |                          |  |
     |  v             |                          v  |
    SUSPENDING_WAIT   |                  SUSPENDING_PROCESS
     |                |                             |
     | data available |        processing finished  |
     |-------------»SUSPENDED«----------------------|

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class Enum

  `Enum.EnumDesc<E>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `CLOSING`
  `PROCESSING`
  `SUSPENDED`
  `SUSPENDING_PROCESS`
  `SUSPENDING_WAIT`
  `WAITING`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isSuspended()`
  `static WsFrameBase.ReadState`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static WsFrameBase.ReadState[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### WAITING

    public static final WsFrameBase.ReadState WAITING

  - ### PROCESSING

    public static final WsFrameBase.ReadState PROCESSING

  - ### SUSPENDING_WAIT

    public static final WsFrameBase.ReadState SUSPENDING_WAIT

  - ### SUSPENDING_PROCESS

    public static final WsFrameBase.ReadState SUSPENDING_PROCESS

  - ### SUSPENDED

    public static final WsFrameBase.ReadState SUSPENDED

  - ### CLOSING

    public static final WsFrameBase.ReadState CLOSING

- ## Method Details

  - ### values

    public static WsFrameBase.ReadState[] 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 WsFrameBase.ReadState 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

  - ### isSuspended

    public boolean isSuspended()