Class DecoratedCall<T>

  • Type Parameters:
    T - Call parameter type
    All Implemented Interfaces:
    java.lang.Cloneable, retrofit2.Call<T>
    Direct Known Subclasses:
    RetrofitCircuitBreaker.CircuitBreakingCall, RetrofitRateLimiter.RateLimitingCall

    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 Detail

      • DecoratedCall

        public DecoratedCall​(retrofit2.Call<T> call)
    • Method Detail

      • 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>