Interface D1Task.Callback<T>

Type Parameters:
T - The type of the returning data.
Enclosing class:
D1Task

public static interface D1Task.Callback<T>
Generic callback to return result of an asynchronous call.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onError(D1Exception exception)
    The request failed while executing.
    void
    onSuccess(T data)
    The request has been successfully executed.
  • Method Details

    • onSuccess

      void onSuccess(T data)
      The request has been successfully executed.
      Parameters:
      data - Result of the request. Use the API to check the actual result to determine if this argument is nullable. Typically, it is a non-null value. When the type T is Void, the returned argument is always null.
    • onError

      void onError(@NonNull D1Exception exception)
      The request failed while executing.
      Parameters:
      exception - The cause of the failure.