Class ConnectionManager
-
- All Implemented Interfaces:
public final class ConnectionManagerClass representing a connection manager for making network requests. This class handles the connection and response interception for network requests.
-
-
Constructor Summary
Constructors Constructor Description ConnectionManager(Array<Interceptor> interceptors, Array<Interceptor> networkInterceptors, Dispatcher dispatcher, TimeoutConfig timeoutConfig)
-
Method Summary
Modifier and Type Method Description final NetworkResponsestart(NetworkRequest request)Starts a network request and returns the response. final UnitsetOkHttpClientForTesting(OkHttpClient client)final OkHttpClientgetOkHttpClient()-
-
Constructor Detail
-
ConnectionManager
ConnectionManager(Array<Interceptor> interceptors, Array<Interceptor> networkInterceptors, Dispatcher dispatcher, TimeoutConfig timeoutConfig)
- Parameters:
timeoutConfig- The timeout configuration for network requests.
-
-
Method Detail
-
start
@WorkerThread() final NetworkResponse start(NetworkRequest request)
Starts a network request and returns the response. The retry logic is now handled by the RetryInterceptor.
- Parameters:
request- The network request to start.- Returns:
The network response.
-
setOkHttpClientForTesting
final Unit setOkHttpClientForTesting(OkHttpClient client)
-
getOkHttpClient
final OkHttpClient getOkHttpClient()
-
-
-
-