Interface DataFetcher.DataCallback<T>

  • Type Parameters:
    T - The type of data that will be loaded.
    Enclosing interface:
    DataFetcher<T>

    public static interface DataFetcher.DataCallback<T>
    Callback that must be called when data has been loaded and is available, or when the load fails.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onDataReady​(T data)
      Called with the loaded data if the load succeeded, or with null if the load failed.
      void onLoadFailed​(java.lang.Exception e)
      Called when the load fails.
    • Method Detail

      • onDataReady

        void onDataReady​(@Nullable
                         T data)
        Called with the loaded data if the load succeeded, or with null if the load failed.
      • onLoadFailed

        void onLoadFailed​(@NonNull
                          java.lang.Exception e)
        Called when the load fails.
        Parameters:
        e - a non-null Exception indicating why the load failed.