- 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 updatedFlowControlwith its accept operation disabled.Returns an updatedFlowControlwith its accept operation enabled.and(FlowControl that) Returns theFlowControlwith all operations enabled inthisandthatenabled.Returns an updatedFlowControlwith its connect operation disabled.Returns an updatedFlowControlwith its connect operation enabled.<T> Output<T>Writes a developer readable, debug-formatted string representation of this object tooutput.static FlowControlfromSelectorOps(int selectorOps) Returns theFlowControlcorresponding to the givenSelectionKeyinterest set.booleanReturnstrueif the accept operation is enabled.booleanReturnstrueif the connect operation is enabled.booleanReturnstrueif the read operation is enabled.booleanReturnstrueif the write operation is enabled.modify(FlowModifier flowModifier) Returns an updatedFlowControlwith its read and write operations patched by aflowModifierdelta.not()Returns theFlowControlwith all operations enabled inthisdisabled, and all operations disabled inthisenabled.or(FlowControl that) Returns theFlowControlwith all operations enabled inthisorthatenabled.Returns an updatedFlowControlwith its read operation disabled.Returns an updatedFlowControlwith its read operation enabled.intReturns theSelectionKeyinterest set corresponding to thisFlowControl.static FlowControlReturns 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 updatedFlowControlwith its write operation disabled.Returns an updatedFlowControlwith its write operation enabled.xor(FlowControl that) Returns theFlowControlwith all operations enabled inthisorthat—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()Returnstrueif the accept operation is enabled. -
isConnectEnabled
public boolean isConnectEnabled()Returnstrueif the connect operation is enabled. -
isReadEnabled
public boolean isReadEnabled()Returnstrueif the read operation is enabled. -
isWriteEnabled
public boolean isWriteEnabled()Returnstrueif the write operation is enabled. -
acceptDisabled
Returns an updatedFlowControlwith its accept operation disabled. -
acceptEnabled
Returns an updatedFlowControlwith its accept operation enabled. -
connectDisabled
Returns an updatedFlowControlwith its connect operation disabled. -
connectEnabled
Returns an updatedFlowControlwith its connect operation enabled. -
readDisabled
Returns an updatedFlowControlwith its read operation disabled. -
readEnabled
Returns an updatedFlowControlwith its read operation enabled. -
writeDisabled
Returns an updatedFlowControlwith its write operation disabled. -
writeEnabled
Returns an updatedFlowControlwith its write operation enabled. -
modify
Returns an updatedFlowControlwith its read and write operations patched by aflowModifierdelta. -
or
Returns theFlowControlwith all operations enabled inthisorthatenabled. -
xor
Returns theFlowControlwith all operations enabled inthisorthat—but not both—enabled. -
and
Returns theFlowControlwith all operations enabled inthisandthatenabled. -
not
Returns theFlowControlwith all operations enabled inthisdisabled, and all operations disabled inthisenabled. -
toSelectorOps
public int toSelectorOps()Returns theSelectionKeyinterest set corresponding to thisFlowControl. -
debug
Description copied from interface:DebugWrites a developer readable, debug-formatted string representation of this object tooutput. -
fromSelectorOps
Returns theFlowControlcorresponding to the givenSelectionKeyinterest set.
-