Package org.apache.sshd.common.future
Interface VerifiableFuture<T>
- Type Parameters:
T
- Type of verification result
- All Known Subinterfaces:
AuthFuture
,CancelFuture
,ConnectFuture
,IoReadFuture
,IoWriteFuture
,KeyExchangeFuture
,OpenFuture
- All Known Implementing Classes:
AbstractIoWriteFuture
,ChannelAsyncInputStream.IoReadFutureImpl
,ChannelAsyncOutputStream.BufferedFuture
,DefaultAuthFuture
,DefaultCancelFuture
,DefaultCancellableSshFuture
,DefaultConnectFuture
,DefaultIoConnectFuture
,DefaultKeyExchangeFuture
,DefaultOpenFuture
,DefaultVerifiableSshFuture
,IoWriteFutureImpl
,Nio2DefaultIoWriteFuture
,PendingWriteFuture
,SimpleIoOutputStream.DefaultIoWriteFuture
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents an asynchronous operation whose successful result can be verified somehow. The contract guarantees that if
the
verifyXXX
method returns without an exception then the operation was completed successfully-
Method Summary
Modifier and TypeMethodDescriptiondefault T
verify()
WaitLong.MAX_VALUE
msec.default T
verify
(long timeoutMillis) Wait and verify that the operation was successfuldefault T
Wait and verify that the operation was successfuldefault T
verify
(long timeout, TimeUnit unit, CancelOption... options) Wait and verify that the operation was successfulverify
(long timeoutMillis, CancelOption... options) Wait and verify that the operation was successfuldefault T
Wait and verify that the operation was successfuldefault T
verify
(Duration timeout, CancelOption... options) Wait and verify that the operation was successfuldefault T
verify
(CancelOption... options) WaitLong.MAX_VALUE
msec.
-
Method Details
-
verify
WaitLong.MAX_VALUE
msec. and verify that the operation was successful- Returns:
- The (same) future instance
- Throws:
IOException
- If failed to verify successfully on time- See Also:
-
verify
WaitLong.MAX_VALUE
msec. and verify that the operation was successful- Parameters:
options
- OptionalCancelOption
s defining the behavior on time-out or interrupt; ignored if the future is notCancellable
.- Returns:
- The (same) future instance
- Throws:
IOException
- If failed to verify successfully on time- See Also:
-
verify
Wait and verify that the operation was successful- Parameters:
timeout
- The number of time units to waitunit
- The waitTimeUnit
- Returns:
- The (same) future instance
- Throws:
IOException
- If failed to verify successfully on time- See Also:
-
verify
Wait and verify that the operation was successful- Parameters:
timeout
- The number of time units to waitunit
- The waitTimeUnit
options
- OptionalCancelOption
s defining the behavior on time-out or interrupt; ignored if the future is notCancellable
.- Returns:
- The (same) future instance
- Throws:
IOException
- If failed to verify successfully on time- See Also:
-
verify
Wait and verify that the operation was successful- Parameters:
timeout
- The maximum duration to wait,null
to wait forever- Returns:
- The (same) future instance
- Throws:
IOException
- If failed to verify successfully on time- See Also:
-
verify
Wait and verify that the operation was successful- Parameters:
timeout
- The maximum duration to wait,null
to wait foreveroptions
- OptionalCancelOption
s defining the behavior on time-out or interrupt; ignored if the future is notCancellable
.- Returns:
- The (same) future instance
- Throws:
IOException
- If failed to verify successfully on time- See Also:
-
verify
Wait and verify that the operation was successful- Parameters:
timeoutMillis
- Wait timeout in milliseconds- Returns:
- The (same) future instance
- Throws:
IOException
- If failed to verify successfully on time
-
verify
Wait and verify that the operation was successful- Parameters:
timeoutMillis
- Wait timeout in millisecondsoptions
- OptionalCancelOption
s defining the behavior on time-out or interrupt; ignored if the future is notCancellable
.- Returns:
- The (same) future instance
- Throws:
IOException
- If failed to verify successfully on time
-