Package io.github.resilience4j.retrofit
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
-
Method Summary
Modifier and Type Method Description voidcancel()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.voidenqueue(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 responsebooleanisCanceled()True ifcancel()was called.booleanisExecuted()okhttp3.Requestrequest()The original HTTP request.
-
Constructor Details
-
Method Details
-
enqueue
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:
enqueuein interfaceretrofit2.Call<T>- Overrides:
enqueuein classDecoratedCall<T>
-
execute
Synchronously send the request and return its response- Specified by:
executein interfaceretrofit2.Call<T>- Overrides:
executein classDecoratedCall<T>- Throws:
java.io.IOException
-
clone
Create a new, identical call to this one which can be enqueued or executed even if this call has already been.- Specified by:
clonein interfaceretrofit2.Call<T>- Specified by:
clonein classDecoratedCall<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:
isExecutedin interfaceretrofit2.Call<T>- Overrides:
isExecutedin classDecoratedCall<T>
-
isCanceled
public boolean isCanceled()True ifcancel()was called.- Specified by:
isCanceledin interfaceretrofit2.Call<T>- Overrides:
isCanceledin classDecoratedCall<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:
cancelin interfaceretrofit2.Call<T>- Overrides:
cancelin classDecoratedCall<T>
-
request
public okhttp3.Request request()The original HTTP request.- Specified by:
requestin interfaceretrofit2.Call<T>- Overrides:
requestin classDecoratedCall<T>
-