Interface Call

  • All Implemented Interfaces:

    
    public interface Call<T extends Object>
    
                        

    Represents an API call.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract T execute() Executes the call on the caller thread.
      abstract Unit enqueue(Callback<T> callback) Schedules the request to be executed at some point in the future.
      abstract Unit cancel() Cancels the request, if possible.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • execute

         abstract T execute()

        Executes the call on the caller thread.

      • enqueue

         abstract Unit enqueue(Callback<T> callback)

        Schedules the request to be executed at some point in the future.

        Parameters:
        callback - a callback to invoke on completion
      • cancel

         abstract Unit cancel()

        Cancels the request, if possible.