Class GraphClientFactory
java.lang.Object
com.microsoft.graph.core.requests.GraphClientFactory
The GraphClientFactory used to create the OkHttpClient.
-
Method Summary
Modifier and TypeMethodDescriptionstatic okhttp3.OkHttpClient.Buildercreate()The default OkHttpClient Builder for Graph.static okhttp3.OkHttpClient.Buildercreate(com.azure.core.credential.TokenCredential tokenCredential) OkHttpClient Builder for Graph with authentication middleware that uses the specified TokenCredential.static okhttp3.OkHttpClient.Buildercreate(com.azure.core.credential.TokenCredential tokenCredential, com.microsoft.kiota.RequestOption[] requestOptions) OkHttpClient Builder for Graph with authentication middleware that uses the specified TokenCredential and RequestOptions to override default graph interceptors.static okhttp3.OkHttpClient.Buildercreate(GraphClientOption graphClientOption) The OkHttpClient Builder with optional GraphClientOptionstatic okhttp3.OkHttpClient.Buildercreate(GraphClientOption graphClientOption, List<okhttp3.Interceptor> interceptors) OkHttpClient Builder for Graph with specified Interceptors and GraphClientOption.static okhttp3.OkHttpClient.Buildercreate(GraphClientOption graphClientOption, okhttp3.Interceptor... interceptors) OkHttpClient Builder for Graph with specified Interceptors and GraphClientOption.static okhttp3.OkHttpClient.Buildercreate(com.microsoft.kiota.authentication.BaseBearerTokenAuthenticationProvider authenticationProvider) OkHttpClient Builder for Graph with specified AuthenticationProvider.static okhttp3.OkHttpClient.Buildercreate(com.microsoft.kiota.authentication.BaseBearerTokenAuthenticationProvider authenticationProvider, com.microsoft.kiota.RequestOption[] requestOptions) OkHttpClient Builder for Graph with specified AuthenticationProvider and RequestOptions to override default graph interceptorsstatic okhttp3.OkHttpClient.Buildercreate(com.microsoft.kiota.RequestOption[] requestOptions) The OkHttpClient Builder with optional GraphClientOption and RequestOptions to override default graph interceptorsstatic okhttp3.OkHttpClient.BuilderOkHttpClient Builder for Graph with specified Interceptorsstatic okhttp3.OkHttpClient.Buildercreate(okhttp3.Interceptor... interceptors) OkHttpClient Builder for Graph with specified Interceptors.static okhttp3.Interceptor[]createDefaultGraphInterceptors(GraphClientOption graphClientOption) Creates the default Interceptors for use with Graph.static okhttp3.Interceptor[]createDefaultGraphInterceptors(com.microsoft.kiota.RequestOption[] requestOptions) Creates the default Interceptors for use with Graph configured with the provided RequestOptions.
-
Method Details
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create()The default OkHttpClient Builder for Graph.- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nonnull okhttp3.Interceptor... interceptors) OkHttpClient Builder for Graph with specified Interceptors.- Parameters:
interceptors- desired interceptors for use in requests.- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nonnull List<okhttp3.Interceptor> interceptors) OkHttpClient Builder for Graph with specified Interceptors- Parameters:
interceptors- desired interceptors for use in requests.- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nonnull com.azure.core.credential.TokenCredential tokenCredential) OkHttpClient Builder for Graph with authentication middleware that uses the specified TokenCredential.- Parameters:
tokenCredential- the TokenCredential to use for authentication.- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nonnull com.azure.core.credential.TokenCredential tokenCredential, @Nonnull com.microsoft.kiota.RequestOption[] requestOptions) OkHttpClient Builder for Graph with authentication middleware that uses the specified TokenCredential and RequestOptions to override default graph interceptors.- Parameters:
tokenCredential- the TokenCredential to use for authentication.requestOptions- custom request options to override default graph interceptors- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nonnull com.microsoft.kiota.authentication.BaseBearerTokenAuthenticationProvider authenticationProvider) OkHttpClient Builder for Graph with specified AuthenticationProvider. Adds an AuthorizationHandler to the OkHttpClient Builder.- Parameters:
authenticationProvider- the AuthenticationProvider to use for requests.- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nonnull com.microsoft.kiota.authentication.BaseBearerTokenAuthenticationProvider authenticationProvider, @Nonnull com.microsoft.kiota.RequestOption[] requestOptions) OkHttpClient Builder for Graph with specified AuthenticationProvider and RequestOptions to override default graph interceptors- Parameters:
authenticationProvider- the AuthenticationProvider to use for requests.requestOptions- custom request options to override default graph interceptors- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nonnull GraphClientOption graphClientOption, @Nonnull okhttp3.Interceptor... interceptors) OkHttpClient Builder for Graph with specified Interceptors and GraphClientOption.- Parameters:
graphClientOption- the GraphClientOption for use in requests.interceptors- desired interceptors for use in requests.- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nonnull GraphClientOption graphClientOption, @Nonnull List<okhttp3.Interceptor> interceptors) OkHttpClient Builder for Graph with specified Interceptors and GraphClientOption.- Parameters:
graphClientOption- the GraphClientOption for use in requests.interceptors- desired interceptors for use in requests.- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nullable GraphClientOption graphClientOption) The OkHttpClient Builder with optional GraphClientOption- Parameters:
graphClientOption- the GraphClientOption for use in requests.- Returns:
- an OkHttpClient Builder instance.
-
create
@Nonnull public static okhttp3.OkHttpClient.Builder create(@Nonnull com.microsoft.kiota.RequestOption[] requestOptions) The OkHttpClient Builder with optional GraphClientOption and RequestOptions to override default graph interceptors- Parameters:
requestOptions- custom request options to override default graph interceptors- Returns:
- an OkHttpClient Builder instance.
-
createDefaultGraphInterceptors
@Nonnull public static okhttp3.Interceptor[] createDefaultGraphInterceptors(@Nonnull GraphClientOption graphClientOption) Creates the default Interceptors for use with Graph.- Parameters:
graphClientOption- the GraphClientOption used to create the GraphTelemetryHandler with.- Returns:
- an array of interceptors.
-
createDefaultGraphInterceptors
@Nonnull public static okhttp3.Interceptor[] createDefaultGraphInterceptors(@Nonnull com.microsoft.kiota.RequestOption[] requestOptions) Creates the default Interceptors for use with Graph configured with the provided RequestOptions.- Parameters:
requestOptions- custom request options to override default graph interceptors- Returns:
- an array of interceptors.
-