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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onError​(java.lang.Throwable error)
      This method is called on failure.
      void onSuccess​(T result)
      This method is called on successful completion.
    • Method Detail

      • onSuccess

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

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