Package com.azure.core.http.okhttp
Class OkHttpAsyncClientProvider
java.lang.Object
com.azure.core.http.okhttp.OkHttpAsyncClientProvider
- All Implemented Interfaces:
HttpClientProvider
An
HttpClientProvider
that provides an implementation of HttpClient based on OkHttp.-
Constructor Summary
ConstructorDescriptionFor testing purpose only, assigning 'AZURE_ENABLE_HTTP_CLIENT_SHARING' to 'enableHttpClientSharing' for 'final' modifier. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of theHttpClient
that this HttpClientProvider is configured to create.createInstance
(HttpClientOptions clientOptions) Creates a new instance of theHttpClient
that this HttpClientProvider is configured to create.
-
Constructor Details
-
OkHttpAsyncClientProvider
public OkHttpAsyncClientProvider()For testing purpose only, assigning 'AZURE_ENABLE_HTTP_CLIENT_SHARING' to 'enableHttpClientSharing' for 'final' modifier.
-
-
Method Details
-
createInstance
Description copied from interface:HttpClientProvider
Creates a new instance of theHttpClient
that this HttpClientProvider is configured to create.- Specified by:
createInstance
in interfaceHttpClientProvider
- Returns:
- A new
HttpClient
instance, entirely unrelated to all other instances that were created previously.
-
createInstance
Description copied from interface:HttpClientProvider
Creates a new instance of theHttpClient
that this HttpClientProvider is configured to create.- Specified by:
createInstance
in interfaceHttpClientProvider
- Parameters:
clientOptions
- Configuration options applied to the createdHttpClient
.- Returns:
- A new
HttpClient
instance, entirely unrelated to all other instances that were created previously.
-