Class RetrofitRetry.RetryCall<T>

java.lang.Object
io.github.resilience4j.retrofit.internal.DecoratedCall<T>
io.github.resilience4j.retrofit.RetrofitRetry.RetryCall<T>
All Implemented Interfaces:
java.lang.Cloneable, retrofit2.Call<T>
Enclosing interface:
RetrofitRetry

public static class RetrofitRetry.RetryCall<T>
extends DecoratedCall<T>
  • Constructor Summary

    Constructors 
    Constructor Description
    RetryCall​(retrofit2.Call<T> call, io.github.resilience4j.retry.Retry retry)  
  • Method Summary

    Modifier and Type Method Description
    void cancel()
    Cancel this call.
    retrofit2.Call<T> clone()
    Create a new, identical call to this one which can be enqueued or executed even if this call has already been.
    void enqueue​(retrofit2.Callback<T> callback)
    Asynchronously send the request and notify callback of its response or if an error occurred talking to the server, creating the request, or processing the response.
    retrofit2.Response<T> execute()
    Synchronously send the request and return its response
    boolean isCanceled()
    True if cancel() was called.
    boolean isExecuted()
    Returns true if this call has been either executed or enqueued.
    okhttp3.Request request()
    The original HTTP request.

    Methods inherited from class java.lang.Object

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

    • RetryCall

      public RetryCall​(retrofit2.Call<T> call, io.github.resilience4j.retry.Retry retry)
  • Method Details

    • enqueue

      public void enqueue​(retrofit2.Callback<T> callback)
      Asynchronously send the request and notify callback of its response or if an error occurred talking to the server, creating the request, or processing the response.
      Specified by:
      enqueue in interface retrofit2.Call<T>
      Overrides:
      enqueue in class DecoratedCall<T>
    • execute

      public retrofit2.Response<T> execute() throws java.io.IOException
      Synchronously send the request and return its response
      Specified by:
      execute in interface retrofit2.Call<T>
      Overrides:
      execute in class DecoratedCall<T>
      Throws:
      java.io.IOException
    • clone

      public retrofit2.Call<T> clone()
      Create a new, identical call to this one which can be enqueued or executed even if this call has already been.
      Specified by:
      clone in interface retrofit2.Call<T>
      Specified by:
      clone in class DecoratedCall<T>
    • isExecuted

      public boolean isExecuted()
      Returns true if this call has been either executed or enqueued. It is an error to execute or enqueue a call more than once.
      Specified by:
      isExecuted in interface retrofit2.Call<T>
      Overrides:
      isExecuted in class DecoratedCall<T>
    • isCanceled

      public boolean isCanceled()
      True if cancel() was called.
      Specified by:
      isCanceled in interface retrofit2.Call<T>
      Overrides:
      isCanceled in class DecoratedCall<T>
    • cancel

      public void cancel()
      Cancel this call. An attempt will be made to cancel in-flight calls, and if the call has not yet been executed it never will be.
      Specified by:
      cancel in interface retrofit2.Call<T>
      Overrides:
      cancel in class DecoratedCall<T>
    • request

      public okhttp3.Request request()
      The original HTTP request.
      Specified by:
      request in interface retrofit2.Call<T>
      Overrides:
      request in class DecoratedCall<T>