public class SchemaRegistryClientBuilder extends Object
SchemaRegistryAsyncClient
.Constructor and Description |
---|
SchemaRegistryClientBuilder()
Constructor for CachedSchemaRegistryClientBuilder.
|
Modifier and Type | Method and Description |
---|---|
SchemaRegistryClientBuilder |
addPolicy(com.azure.core.http.policy.HttpPipelinePolicy policy)
Adds a policy to the set of existing policies that are executed after required policies.
|
SchemaRegistryAsyncClient |
buildAsyncClient()
Creates a
SchemaRegistryAsyncClient based on options set in the builder. |
SchemaRegistryClient |
buildClient()
Creates synchronous
SchemaRegistryClient instance. |
SchemaRegistryClientBuilder |
credential(com.azure.core.credential.TokenCredential credential)
Sets the
TokenCredential to use when authenticating HTTP requests for this
SchemaRegistryAsyncClient . |
SchemaRegistryClientBuilder |
endpoint(String endpoint)
Sets the service endpoint for the Azure Schema Registry instance.
|
SchemaRegistryClientBuilder |
httpClient(com.azure.core.http.HttpClient httpClient)
Sets the HTTP client to use for sending and receiving requests to and from the service.
|
SchemaRegistryClientBuilder |
httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions)
Sets the logging configuration for HTTP requests and responses.
|
SchemaRegistryClientBuilder |
maxCacheSize(int maxCacheSize)
Sets schema cache size limit.
|
SchemaRegistryClientBuilder |
pipeline(com.azure.core.http.HttpPipeline httpPipeline)
Sets the HTTP pipeline to use for the service client.
|
SchemaRegistryClientBuilder |
retryPolicy(com.azure.core.http.policy.RetryPolicy retryPolicy)
Sets the
RetryPolicy that is used when each request is sent. |
public SchemaRegistryClientBuilder()
public SchemaRegistryClientBuilder endpoint(String endpoint)
endpoint
- The URL of the Azure Schema Registry instanceSchemaRegistryClientBuilder
object.NullPointerException
- if endpoint
is nullIllegalArgumentException
- if endpoint
cannot be parsed into a valid URLpublic SchemaRegistryClientBuilder maxCacheSize(int maxCacheSize)
maxCacheSize
- max size for internal schema caches in SchemaRegistryAsyncClient
SchemaRegistryClientBuilder
object.IllegalArgumentException
- on invalid maxCacheSize valuepublic SchemaRegistryClientBuilder httpClient(com.azure.core.http.HttpClient httpClient)
httpClient
- The HTTP client to use for requests.SchemaRegistryClientBuilder
object.public SchemaRegistryClientBuilder pipeline(com.azure.core.http.HttpPipeline httpPipeline)
If pipeline
is set, all other HTTP settings are ignored to build SchemaRegistryAsyncClient
.
httpPipeline
- The HTTP pipeline to use for sending service requests and receiving responses.SchemaRegistryClientBuilder
object.public SchemaRegistryClientBuilder credential(com.azure.core.credential.TokenCredential credential)
TokenCredential
to use when authenticating HTTP requests for this
SchemaRegistryAsyncClient
.credential
- TokenCredential
SchemaRegistryClientBuilder
object.NullPointerException
- If credential
is null
public SchemaRegistryClientBuilder httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions)
If logLevel is not provided, default value of HttpLogDetailLevel.NONE
is set.
logOptions
- The logging configuration to use when sending and receiving HTTP requests/responses.SchemaRegistryClientBuilder
object.public SchemaRegistryClientBuilder retryPolicy(com.azure.core.http.policy.RetryPolicy retryPolicy)
RetryPolicy
that is used when each request is sent.
The default retry policy will be used if not provided to build SchemaRegistryAsyncClient
.
retryPolicy
- user's retry policy applied to each request.SchemaRegistryClientBuilder
object.public SchemaRegistryClientBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy policy)
policy
- The retry policy for service requests.SchemaRegistryClientBuilder
object.NullPointerException
- If policy
is null
.public SchemaRegistryAsyncClient buildAsyncClient()
SchemaRegistryAsyncClient
based on options set in the builder.
Every time buildClient()
is called a new instance of SchemaRegistryAsyncClient
is created.
If pipeline
is set, then all HTTP pipeline related settings are ignored.SchemaRegistryAsyncClient
with the options set from the builder.NullPointerException
- if endpoint
and
credential
are not set.public SchemaRegistryClient buildClient()
SchemaRegistryClient
instance.
See async builder method for options validation.SchemaRegistryClient
with the options set from the builder.NullPointerException
- if endpoint
and
credential
are not set.Copyright © 2020 Microsoft Corporation. All rights reserved.