Class Callback<E>

  • Type Parameters:
    E - The result type.


    public abstract class Callback<E>
    extends java.lang.Object
    Simple Callback used to deliver results asynchronously.

    As always, keep a strong reference to the callback in your Activity/Fragment. Don't forget to call Callback.cancel() and revoke the reference to this callback when your Activity/Fragment gets destroyed.

    • Constructor Summary

      Constructors 
      Constructor and Description
      Callback() 
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void cancel()
      Cancel this callback.
      abstract void success(E result)
      Method used to deliver results.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Callback

        public Callback()
    • Method Detail

      • success

        public abstract void success(E result)
        Method used to deliver results.

        Will be invoked on the main thread.

        Parameters:
        result - The result.