Class DecoratedCall<T>

java.lang.Object
io.github.resilience4j.retrofit.internal.DecoratedCall<T>
Type Parameters:
T - Call parameter type
All Implemented Interfaces:
java.lang.Cloneable, retrofit2.Call<T>
Direct Known Subclasses:
RetrofitCircuitBreaker.CircuitBreakingCall, RetrofitRateLimiter.RateLimitingCall, RetrofitRetry.RetryCall

public abstract class DecoratedCall<T>
extends java.lang.Object
implements retrofit2.Call<T>
Simple decorator class that implements Call<T> and delegates all calls the the Call instance provided in the constructor. Methods can be overridden as required.
  • Constructor Summary

    Constructors 
    Constructor Description
    DecoratedCall​(retrofit2.Call<T> call)  
  • Method Summary

    Modifier and Type Method Description
    void cancel()  
    abstract retrofit2.Call<T> clone()  
    void enqueue​(retrofit2.Callback<T> callback)  
    retrofit2.Response<T> execute()  
    boolean isCanceled()  
    boolean isExecuted()  
    okhttp3.Request request()  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • execute

      public retrofit2.Response<T> execute() throws java.io.IOException
      Specified by:
      execute in interface retrofit2.Call<T>
      Throws:
      java.io.IOException
    • enqueue

      public void enqueue​(retrofit2.Callback<T> callback)
      Specified by:
      enqueue in interface retrofit2.Call<T>
    • isExecuted

      public boolean isExecuted()
      Specified by:
      isExecuted in interface retrofit2.Call<T>
    • cancel

      public void cancel()
      Specified by:
      cancel in interface retrofit2.Call<T>
    • isCanceled

      public boolean isCanceled()
      Specified by:
      isCanceled in interface retrofit2.Call<T>
    • clone

      public abstract retrofit2.Call<T> clone()
      Specified by:
      clone in interface retrofit2.Call<T>
      Overrides:
      clone in class java.lang.Object
    • request

      public okhttp3.Request request()
      Specified by:
      request in interface retrofit2.Call<T>