public class ConnectionClosingInterceptor
extends okhttp3.EventListener
implements okhttp3.Interceptor
Caution is advised, as setting a very short interval can lead to performance issues because establishing new connections is a resource-intensive operation.
| Constructor and Description |
|---|
ConnectionClosingInterceptor(Duration connectionMaxAge)
Create a new interceptor that will close connections older than the given max age.
|
| Modifier and Type | Method and Description |
|---|---|
void |
connectionAcquired(okhttp3.Call call,
okhttp3.Connection connection) |
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain) |
cacheConditionalHit, cacheHit, cacheMiss, callEnd, callFailed, callStart, canceled, connectEnd, connectFailed, connectionReleased, connectStart, dnsEnd, dnsStart, proxySelectEnd, proxySelectStart, requestBodyEnd, requestBodyStart, requestFailed, requestHeadersEnd, requestHeadersStart, responseBodyEnd, responseBodyStart, responseFailed, responseHeadersEnd, responseHeadersStart, satisfactionFailure, secureConnectEnd, secureConnectStart@Nonnull public okhttp3.Response intercept(@Nonnull okhttp3.Interceptor.Chain chain) throws IOException
intercept in interface okhttp3.InterceptorIOExceptionCopyright © 2018–2023 InfluxData, Inc.. All rights reserved.