- All Implemented Interfaces:
Serializable
,Comparable<FlowControl>
,Constable
,Debug
Network channel flow state, controlling accept, connect,
read, and write operations.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionaccept enabled; connect, read, and write disabled.accept and connect enabled; read and write disabled.accept, connect, and read enabled; write disabled.accept, connect, read, and write enabled.accept, connect, and write enabled; read disabled.accept and read enabled; connect and write disabled.accept, read, and write enabled; connect disabled.accept and write enabled; connect and read disabled.connect enabled; accept, read, and write disabled.connect and read enabled; accept and write disabled.connect, read, and write enabled; accept disabled.connect and write enabled; accept and read disabled.read enabled; accept, connect, and write disabled.read and write enabled; accept and connect disabled.accept, connect, read, and write disabled.write enabled; accept, connect, and read disabled. -
Method Summary
Modifier and TypeMethodDescriptionReturns an updatedFlowControl
with its accept operation disabled.Returns an updatedFlowControl
with its accept operation enabled.and
(FlowControl that) Returns theFlowControl
with all operations enabled inthis
andthat
enabled.Returns an updatedFlowControl
with its connect operation disabled.Returns an updatedFlowControl
with its connect operation enabled.<T> Output<T>
Writes a developer readable, debug-formatted string representation of this object tooutput
.static FlowControl
fromSelectorOps
(int selectorOps) Returns theFlowControl
corresponding to the givenSelectionKey
interest set.boolean
Returnstrue
if the accept operation is enabled.boolean
Returnstrue
if the connect operation is enabled.boolean
Returnstrue
if the read operation is enabled.boolean
Returnstrue
if the write operation is enabled.modify
(FlowModifier flowModifier) Returns an updatedFlowControl
with its read and write operations patched by aflowModifier
delta.not()
Returns theFlowControl
with all operations enabled inthis
disabled, and all operations disabled inthis
enabled.or
(FlowControl that) Returns theFlowControl
with all operations enabled inthis
orthat
enabled.Returns an updatedFlowControl
with its read operation disabled.Returns an updatedFlowControl
with its read operation enabled.int
Returns theSelectionKey
interest set corresponding to thisFlowControl
.static FlowControl
Returns the enum constant of this class with the specified name.static FlowControl[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Returns an updatedFlowControl
with its write operation disabled.Returns an updatedFlowControl
with its write operation enabled.xor
(FlowControl that) Returns theFlowControl
with all operations enabled inthis
orthat
—but not both—enabled.
-
Enum Constant Details
-
WAIT
accept, connect, read, and write disabled. -
ACCEPT
accept enabled; connect, read, and write disabled. -
CONNECT
connect enabled; accept, read, and write disabled. -
ACCEPT_CONNECT
accept and connect enabled; read and write disabled. -
READ
read enabled; accept, connect, and write disabled. -
ACCEPT_READ
accept and read enabled; connect and write disabled. -
CONNECT_READ
connect and read enabled; accept and write disabled. -
ACCEPT_CONNECT_READ
accept, connect, and read enabled; write disabled. -
WRITE
write enabled; accept, connect, and read disabled. -
ACCEPT_WRITE
accept and write enabled; connect and read disabled. -
CONNECT_WRITE
connect and write enabled; accept and read disabled. -
ACCEPT_CONNECT_WRITE
accept, connect, and write enabled; read disabled. -
READ_WRITE
read and write enabled; accept and connect disabled. -
ACCEPT_READ_WRITE
accept, read, and write enabled; connect disabled. -
CONNECT_READ_WRITE
connect, read, and write enabled; accept disabled. -
ACCEPT_CONNECT_READ_WRITE
accept, connect, read, and write enabled.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
isAcceptEnabled
public boolean isAcceptEnabled()Returnstrue
if the accept operation is enabled. -
isConnectEnabled
public boolean isConnectEnabled()Returnstrue
if the connect operation is enabled. -
isReadEnabled
public boolean isReadEnabled()Returnstrue
if the read operation is enabled. -
isWriteEnabled
public boolean isWriteEnabled()Returnstrue
if the write operation is enabled. -
acceptDisabled
Returns an updatedFlowControl
with its accept operation disabled. -
acceptEnabled
Returns an updatedFlowControl
with its accept operation enabled. -
connectDisabled
Returns an updatedFlowControl
with its connect operation disabled. -
connectEnabled
Returns an updatedFlowControl
with its connect operation enabled. -
readDisabled
Returns an updatedFlowControl
with its read operation disabled. -
readEnabled
Returns an updatedFlowControl
with its read operation enabled. -
writeDisabled
Returns an updatedFlowControl
with its write operation disabled. -
writeEnabled
Returns an updatedFlowControl
with its write operation enabled. -
modify
Returns an updatedFlowControl
with its read and write operations patched by aflowModifier
delta. -
or
Returns theFlowControl
with all operations enabled inthis
orthat
enabled. -
xor
Returns theFlowControl
with all operations enabled inthis
orthat
—but not both—enabled. -
and
Returns theFlowControl
with all operations enabled inthis
andthat
enabled. -
not
Returns theFlowControl
with all operations enabled inthis
disabled, and all operations disabled inthis
enabled. -
toSelectorOps
public int toSelectorOps()Returns theSelectionKey
interest set corresponding to thisFlowControl
. -
debug
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
. -
fromSelectorOps
Returns theFlowControl
corresponding to the givenSelectionKey
interest set.
-