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 Detail

      • onSuccess

        void onSuccess​(T data)
        The request has been successfully executed.
        Parameters:
        data - Result value of the request. Check the actual using API to know if this argument is nullable or not; usually it is non-null. 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.