-
- All Implemented Interfaces:
-
com.mobwith.httpmodule.Interceptor
public final class RetryAndFollowUpInterceptor implements Interceptor
This interceptor recovers from failures and follows redirects as necessary. It may throw an IOException if the call was canceled.
-
-
Field Summary
Fields Modifier and Type Field Description private ObjectcallStackTrace
-
Constructor Summary
Constructors Constructor Description RetryAndFollowUpInterceptor(MobonOkHttpClient client, boolean forWebSocket)
-
Method Summary
Modifier and Type Method Description voidsetCallStackTrace(Object callStackTrace)voidcancel()Immediately closes the socket connection if it's currently held. booleanisCanceled()StreamAllocationstreamAllocation()MobonResponseintercept(Interceptor.Chain chain)-
-
Constructor Detail
-
RetryAndFollowUpInterceptor
RetryAndFollowUpInterceptor(MobonOkHttpClient client, boolean forWebSocket)
-
-
Method Detail
-
setCallStackTrace
void setCallStackTrace(Object callStackTrace)
-
cancel
void cancel()
Immediately closes the socket connection if it's currently held. Use this to interrupt anin-flight request from any thread. It's the caller's responsibility to close the request bodyand response body streams; otherwise resources may be leaked.
This method is safe to be called concurrently, but provides limited guarantees. If atransport layer connection has been established (such as a HTTP/2 stream) that is terminated.Otherwise if a socket connection is being established, that is terminated.
-
isCanceled
boolean isCanceled()
-
streamAllocation
StreamAllocation streamAllocation()
-
intercept
MobonResponse intercept(Interceptor.Chain chain)
-
-
-
-