Package org.apache.sshd.common.future
Interface VerifiableFuture<T>
-
- Type Parameters:
T- Type of verification result
- All Known Subinterfaces:
IoReadFuture,IoWriteFuture
- All Known Implementing Classes:
AbstractIoWriteFuture,DefaultVerifiableSshFuture
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface VerifiableFuture<T>
Represents an asynchronous operation whose successful result can be verified somehow. The contract guarantees that if theverifyXXXmethod returns without an exception then the operation was completed successfully- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Tverify()WaitLong.MAX_VALUEmsec.Tverify(long timeoutMillis)Wait and verify that the operation was successfuldefault Tverify(long timeout, TimeUnit unit)Wait and verify that the operation was successfuldefault Tverify(Duration timeout)Wait and verify that the operation was successful
-
-
-
Method Detail
-
verify
default T verify() throws IOException
WaitLong.MAX_VALUEmsec. and verify that the operation was successful- Returns:
- The (same) future instance
- Throws:
IOException- If failed to verify successfully on time- See Also:
verify(long)
-
verify
default T verify(long timeout, TimeUnit unit) throws IOException
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(long)
-
verify
default T verify(Duration timeout) throws IOException
Wait and verify that the operation was successful- Parameters:
timeout- The maximum duration to wait,nullto wait forever- Returns:
- The (same) future instance
- Throws:
IOException- If failed to verify successfully on time- See Also:
verify(long)
-
verify
T verify(long timeoutMillis) throws IOException
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
-
-