Package 

Class RetryAndFollowUpInterceptor

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

    • Constructor Detail

      • RetryAndFollowUpInterceptor

        RetryAndFollowUpInterceptor(MobonOkHttpClient client, boolean forWebSocket)
    • Method Detail

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