Package com.azure.core.util.builder
Class ClientBuilderUtil
- java.lang.Object
-
- com.azure.core.util.builder.ClientBuilderUtil
-
public final class ClientBuilderUtil extends Object
This class contains utility methods useful for client builders.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HttpPipelinePolicyvalidateAndGetRetryPolicy(HttpPipelinePolicy retryPolicy, RetryOptions retryOptions)This method validates that customizedretry policyand customizedRetryOptionsare mutually exclusive.static HttpPipelinePolicyvalidateAndGetRetryPolicy(HttpPipelinePolicy retryPolicy, RetryOptions retryOptions, HttpPipelinePolicy defaultPolicy)This method validates that customizedretry policyand customizedRetryOptionsare mutually exclusive.
-
-
-
Method Detail
-
validateAndGetRetryPolicy
public static HttpPipelinePolicy validateAndGetRetryPolicy(HttpPipelinePolicy retryPolicy, RetryOptions retryOptions)
This method validates that customizedretry policyand customizedRetryOptionsare mutually exclusive. If no customization was made then it falls back to the default.- Parameters:
retryPolicy- a customizedHttpPipelinePolicy.retryOptions- a customizedRetryOptions.- Returns:
- final
RetryPolicyto be used by the builder. - Throws:
IllegalStateException- if bothretryPolicyandretryOptionsare notnull.
-
validateAndGetRetryPolicy
public static HttpPipelinePolicy validateAndGetRetryPolicy(HttpPipelinePolicy retryPolicy, RetryOptions retryOptions, HttpPipelinePolicy defaultPolicy)
This method validates that customizedretry policyand customizedRetryOptionsare mutually exclusive. If no customization was made then it falls back to the default.- Parameters:
retryPolicy- a customizedHttpPipelinePolicy.retryOptions- a customizedRetryOptions.defaultPolicy- a defaultHttpPipelinePolicy.- Returns:
- final
RetryPolicyto be used by the builder. - Throws:
NullPointerException- ifdefaultPolicyisnull.IllegalStateException- if bothretryPolicyandretryOptionsare notnull.
-
-