Interface Callback

  • All Implemented Interfaces:

    
    public interface Callback<T extends Object>
    
                        

    Communicates responses from a server or offline requests. One and only one method will be invoked in response to a given request.

    • 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 Unit onSuccess(Call<T> call, T response) Invoked for a received response.
      abstract Unit onFailure(Call<T> call, Throwable t) Invoked when a network exception occurred talking to the server or when an unexpected exception occurred creating the request or processing the response.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • onSuccess

         abstract Unit onSuccess(Call<T> call, T response)

        Invoked for a received response.

      • onFailure

         abstract Unit onFailure(Call<T> call, Throwable t)

        Invoked when a network exception occurred talking to the server or when an unexpected exception occurred creating the request or processing the response.