Interface Callback<T>

Type Parameters:
T - the return value type

public interface Callback<T>
General-purpose interface for callbacks that can succeed or fail.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is called on failure.
    void
    onSuccess(T result)
    This method is called on successful completion.
  • Method Details

    • onSuccess

      void onSuccess(T result)
      This method is called on successful completion.
      Parameters:
      result - the return value
    • onError

      void onError(Throwable error)
      This method is called on failure.
      Parameters:
      error - the error/exception object