Package org.apache.sshd.common.future
Enum CancelOption
- All Implemented Interfaces:
Serializable
,Comparable<CancelOption>
A
CancelOption
defines whether a Cancellable
future that is waited upon shall be cancelled if waiting
times out or is interrupted.- See Also:
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that when waiting on a future is interrupted, the future shall be canceled.Indicates that when waiting on a future times out, the future shall be canceled.Indicates that even if waiting on a future times out or is interrupted, it shall not be canceled. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CancelOption
Returns the enum constant of this type with the specified name.static CancelOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CANCEL_ON_TIMEOUT
Indicates that when waiting on a future times out, the future shall be canceled. -
CANCEL_ON_INTERRUPT
Indicates that when waiting on a future is interrupted, the future shall be canceled. -
NO_CANCELLATION
Indicates that even if waiting on a future times out or is interrupted, it shall not be canceled.CANCEL_ON_TIMEOUT
andCANCEL_ON_INTERRUPT
take precedence over this flag. The main purpose of this flag is to be able to callverify(timeout, NO_CANCELLATION)
to suppress cancelling a future on time-outs or interrupts altogether. By default,verify(timeout)
will cancel the future on both time-outs and interrupts.
-
-
Constructor Details
-
CancelOption
private CancelOption()
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-