Interface AsyncCompletionHandler<T>

Type Parameters:
T - the type of a successful completion

public interface AsyncCompletionHandler<T>
Completion handler for asynchronous I/O.
Since:
3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default com.mongodb.internal.async.SingleResultCallback<T>
     
    void
    Invoked when an operation has completed.
    void
    Invoked when an operation fails.
  • Method Details

    • completed

      void completed(@Nullable T t)
      Invoked when an operation has completed.
      Parameters:
      t - the result of the completed operation
    • failed

      void failed(Throwable t)
      Invoked when an operation fails.
      Parameters:
      t - the exception that describes the failure
    • asCallback

      default com.mongodb.internal.async.SingleResultCallback<T> asCallback()
      Returns:
      this handler as a callback