Module swim.io
Package swim.io

Enum Class FlowControl

All Implemented Interfaces:
Serializable, Comparable<FlowControl>, Constable, Debug

public enum FlowControl extends Enum<FlowControl> implements Debug
Network channel flow state, controlling accept, connect, read, and write operations.
See Also:
  • Enum Constant Details

    • WAIT

      public static final FlowControl WAIT
      accept, connect, read, and write disabled.
    • ACCEPT

      public static final FlowControl ACCEPT
      accept enabled; connect, read, and write disabled.
    • CONNECT

      public static final FlowControl CONNECT
      connect enabled; accept, read, and write disabled.
    • ACCEPT_CONNECT

      public static final FlowControl ACCEPT_CONNECT
      accept and connect enabled; read and write disabled.
    • READ

      public static final FlowControl READ
      read enabled; accept, connect, and write disabled.
    • ACCEPT_READ

      public static final FlowControl ACCEPT_READ
      accept and read enabled; connect and write disabled.
    • CONNECT_READ

      public static final FlowControl CONNECT_READ
      connect and read enabled; accept and write disabled.
    • ACCEPT_CONNECT_READ

      public static final FlowControl ACCEPT_CONNECT_READ
      accept, connect, and read enabled; write disabled.
    • WRITE

      public static final FlowControl WRITE
      write enabled; accept, connect, and read disabled.
    • ACCEPT_WRITE

      public static final FlowControl ACCEPT_WRITE
      accept and write enabled; connect and read disabled.
    • CONNECT_WRITE

      public static final FlowControl CONNECT_WRITE
      connect and write enabled; accept and read disabled.
    • ACCEPT_CONNECT_WRITE

      public static final FlowControl ACCEPT_CONNECT_WRITE
      accept, connect, and write enabled; read disabled.
    • READ_WRITE

      public static final FlowControl READ_WRITE
      read and write enabled; accept and connect disabled.
    • ACCEPT_READ_WRITE

      public static final FlowControl ACCEPT_READ_WRITE
      accept, read, and write enabled; connect disabled.
    • CONNECT_READ_WRITE

      public static final FlowControl CONNECT_READ_WRITE
      connect, read, and write enabled; accept disabled.
    • ACCEPT_CONNECT_READ_WRITE

      public static final FlowControl ACCEPT_CONNECT_READ_WRITE
      accept, connect, read, and write enabled.
  • Method Details

    • values

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

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

      public boolean isAcceptEnabled()
      Returns true if the accept operation is enabled.
    • isConnectEnabled

      public boolean isConnectEnabled()
      Returns true if the connect operation is enabled.
    • isReadEnabled

      public boolean isReadEnabled()
      Returns true if the read operation is enabled.
    • isWriteEnabled

      public boolean isWriteEnabled()
      Returns true if the write operation is enabled.
    • acceptDisabled

      public FlowControl acceptDisabled()
      Returns an updated FlowControl with its accept operation disabled.
    • acceptEnabled

      public FlowControl acceptEnabled()
      Returns an updated FlowControl with its accept operation enabled.
    • connectDisabled

      public FlowControl connectDisabled()
      Returns an updated FlowControl with its connect operation disabled.
    • connectEnabled

      public FlowControl connectEnabled()
      Returns an updated FlowControl with its connect operation enabled.
    • readDisabled

      public FlowControl readDisabled()
      Returns an updated FlowControl with its read operation disabled.
    • readEnabled

      public FlowControl readEnabled()
      Returns an updated FlowControl with its read operation enabled.
    • writeDisabled

      public FlowControl writeDisabled()
      Returns an updated FlowControl with its write operation disabled.
    • writeEnabled

      public FlowControl writeEnabled()
      Returns an updated FlowControl with its write operation enabled.
    • modify

      public FlowControl modify(FlowModifier flowModifier)
      Returns an updated FlowControl with its read and write operations patched by a flowModifier delta.
    • or

      public FlowControl or(FlowControl that)
      Returns the FlowControl with all operations enabled in this or that enabled.
    • xor

      public FlowControl xor(FlowControl that)
      Returns the FlowControl with all operations enabled in this or that—but not both—enabled.
    • and

      public FlowControl and(FlowControl that)
      Returns the FlowControl with all operations enabled in this and that enabled.
    • not

      public FlowControl not()
      Returns the FlowControl with all operations enabled in this disabled, and all operations disabled in this enabled.
    • toSelectorOps

      public int toSelectorOps()
      Returns the SelectionKey interest set corresponding to this FlowControl.
    • debug

      public <T> Output<T> debug(Output<T> output)
      Description copied from interface: Debug
      Writes a developer readable, debug-formatted string representation of this object to output.
      Specified by:
      debug in interface Debug
      Returns:
      the continuation of the output.
    • fromSelectorOps

      public static FlowControl fromSelectorOps(int selectorOps)
      Returns the FlowControl corresponding to the given SelectionKey interest set.