Interface VerifiableFuture<T>

Type Parameters:
T - Type of verification result
All Known Subinterfaces:
CancelFuture, IoReadFuture, IoWriteFuture
All Known Implementing Classes:
AbstractIoWriteFuture, DefaultCancelFuture, DefaultCancellableSshFuture, DefaultIoConnectFuture, 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 the verifyXXX method returns without an exception then the operation was completed successfully
Author:
Apache MINA SSHD Project
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    Wait Long.MAX_VALUE msec. and verify that the operation was successful
    default T
    verify(long timeoutMillis)
    Wait and verify that the operation was successful
    default T
    verify(long timeout, TimeUnit unit)
    Wait and verify that the operation was successful
    default T
    verify(long timeout, TimeUnit unit, CancelOption... options)
    Wait and verify that the operation was successful
    verify(long timeoutMillis, CancelOption... options)
    Wait and verify that the operation was successful
    default T
    verify(Duration timeout)
    Wait and verify that the operation was successful
    default T
    verify(Duration timeout, CancelOption... options)
    Wait and verify that the operation was successful
    default T
    verify(CancelOption... options)
    Wait Long.MAX_VALUE msec. and verify that the operation was successful
  • Method Details

    • verify

      default T verify() throws IOException
      Wait Long.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

      default T verify(CancelOption... options) throws IOException
      Wait Long.MAX_VALUE msec. and verify that the operation was successful
      Parameters:
      options - Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
      Returns:
      The (same) future instance
      Throws:
      IOException - If failed to verify successfully on time
      See Also:
    • 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 wait
      unit - The wait TimeUnit
      Returns:
      The (same) future instance
      Throws:
      IOException - If failed to verify successfully on time
      See Also:
    • verify

      default T verify(long timeout, TimeUnit unit, CancelOption... options) throws IOException
      Wait and verify that the operation was successful
      Parameters:
      timeout - The number of time units to wait
      unit - The wait TimeUnit
      options - Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
      Returns:
      The (same) future instance
      Throws:
      IOException - If failed to verify successfully on time
      See Also:
    • verify

      default T verify(Duration timeout) throws IOException
      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

      default T verify(Duration timeout, CancelOption... options) throws IOException
      Wait and verify that the operation was successful
      Parameters:
      timeout - The maximum duration to wait, null to wait forever
      options - Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
      Returns:
      The (same) future instance
      Throws:
      IOException - If failed to verify successfully on time
      See Also:
    • verify

      default 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
    • verify

      T verify(long timeoutMillis, CancelOption... options) throws IOException
      Wait and verify that the operation was successful
      Parameters:
      timeoutMillis - Wait timeout in milliseconds
      options - Optional CancelOptions defining the behavior on time-out or interrupt; ignored if the future is not Cancellable.
      Returns:
      The (same) future instance
      Throws:
      IOException - If failed to verify successfully on time