Class APIRetrofitCallback<T>

java.lang.Object
com.exxothermic.audioeverywheresdk.webservices.retrofit.APIRetrofitCallback<T>
Type Parameters:
T - The type in which the entities retrieved from a successful response should be mapped
All Implemented Interfaces:
retrofit.Callback<T>

public class APIRetrofitCallback<T> extends Object implements retrofit.Callback<T>
Class which wraps a service response handler into a retrofit callback in order to call the handlers defined on the first one.
Since:
10/8/13
  • Constructor Details

  • Method Details

    • success

      public void success(T responseObject, retrofit.client.Response response)
      Method which handles a successful response from Retrofit
      Specified by:
      success in interface retrofit.Callback<T>
      Parameters:
      responseObject - The object that will be mapped in the request
      response - The response object send from the server
    • failure

      public void failure(retrofit.RetrofitError retrofitError)
      Method which handles a failure response from Retrofit
      Specified by:
      failure in interface retrofit.Callback<T>
      Parameters:
      retrofitError - The error given by the Retrofit SDK, which that denotes an error on the request execution.