Class Retrofit2SyncCall<T>

java.lang.Object
com.netflix.spinnaker.kork.retrofit.Retrofit2SyncCall<T>

public class Retrofit2SyncCall<T> extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> T
    execute(retrofit2.Call<T> call)
    Handle IOExceptions from Call.execute method centrally, instead of all places that make retrofit2 API calls.
    static <T> retrofit2.Response<T>
    executeCall(retrofit2.Call<T> call)
    Handle IOExceptions from Call.execute method centrally, instead of all places that make retrofit2 API calls.

    Methods inherited from class java.lang.Object

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

    • Retrofit2SyncCall

      public Retrofit2SyncCall()
  • Method Details

    • execute

      public static <T> T execute(retrofit2.Call<T> call)
      Handle IOExceptions from Call.execute method centrally, instead of all places that make retrofit2 API calls.
      Type Parameters:
      T - Successful response body type.
      Throws:
      SpinnakerNetworkException - if IOException occurs.
    • executeCall

      public static <T> retrofit2.Response<T> executeCall(retrofit2.Call<T> call)
      Handle IOExceptions from Call.execute method centrally, instead of all places that make retrofit2 API calls.
      Parameters:
      call - call to be executed
      Returns:
      Response response after execution
      Throws:
      SpinnakerNetworkException - if IOException occurs.