RoomsClientBuilder Class
- java.
lang. Object - com.
azure. communication. rooms. RoomsClientBuilder
- com.
Implements
public final class RoomsClientBuilder
implements HttpTrait<RoomsClientBuilder>, ConfigurationTrait<RoomsClientBuilder>, ConnectionStringTrait<RoomsClientBuilder>, TokenCredentialTrait<RoomsClientBuilder>, AzureKeyCredentialTrait<RoomsClientBuilder>, EndpointTrait<RoomsClientBuilder>
RoomsClientBuilder that creates RoomsAsyncClient and RoomsClient.
Instantiating a Rooms CLient Builder
RoomsClientBuilder builder = new RoomsClientBuilder();
Using room client builder build a Rooms Client
RoomsClient roomsClient = new RoomsClientBuilder()
.endpoint(endpoint)
.credential(azureKeyCredential)
.buildClient();
Constructor Summary
| Constructor | Description |
|---|---|
| RoomsClientBuilder() |
Creates a new instance of the RoomsClientBuilder. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Rooms |
addPolicy(HttpPipelinePolicy customPolicy)
Apply additional Http |
|
Rooms |
buildAsyncClient()
Create asynchronous client applying HMACAuthentication |
|
Rooms |
buildClient()
Create synchronous client applying Hmac |
|
Rooms |
clientOptions(ClientOptions clientOptions)
Allows the user to set a variety of client-related options, such as user-agent string, headers, etc. |
|
Rooms |
configuration(Configuration configuration)
Sets the configuration object used to retrieve environment configuration values during building of the client. |
|
Rooms |
connectionString(String connectionString)
Set endpoint and credential to use |
|
Rooms |
credential(AzureKeyCredential keyCredential)
Sets the AzureKeyCredential used to authenticate HTTP requests. |
|
Rooms |
credential(TokenCredential tokenCredential)
Sets the TokenCredential used to authenticate HTTP requests. |
|
Rooms |
endpoint(String endpoint)
Set endpoint of the service |
|
Rooms |
httpClient(HttpClient httpClient)
Set http |
|
Rooms |
httpLogOptions(HttpLogOptions logOptions)
Sets the HttpLogOptions for service requests. |
|
Rooms |
pipeline(HttpPipeline pipeline)
Set endpoint of the service |
|
Rooms |
retryOptions(RetryOptions retryOptions)
Sets the RetryOptions for all the requests made through the client. |
|
Rooms |
retryPolicy(RetryPolicy retryPolicy)
Sets the retry policy to use (using the Retry |
|
Rooms |
serviceVersion(RoomsServiceVersion version)
Sets the RoomsServiceVersion that is used when making API requests. |
Methods inherited from java.lang.Object
Constructor Details
RoomsClientBuilder
public RoomsClientBuilder()
Creates a new instance of the RoomsClientBuilder.
Method Details
addPolicy
public RoomsClientBuilder addPolicy(HttpPipelinePolicy customPolicy)
Apply additional HttpPipelinePolicy
Parameters:
Returns:
buildAsyncClient
public RoomsAsyncClient buildAsyncClient()
Create asynchronous client applying HMACAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them
Returns:
buildClient
public RoomsClient buildClient()
Create synchronous client applying HmacAuthenticationPolicy, UserAgentPolicy, RetryPolicy, and CookiePolicy. Additional HttpPolicies specified by additionalPolicies will be applied after them
Returns:
clientOptions
public RoomsClientBuilder clientOptions(ClientOptions clientOptions)
Allows the user to set a variety of client-related options, such as user-agent string, headers, etc.
Parameters:
Returns:
configuration
public RoomsClientBuilder configuration(Configuration configuration)
Sets the configuration object used to retrieve environment configuration values during building of the client.
Parameters:
Returns:
connectionString
public RoomsClientBuilder connectionString(String connectionString)
Set endpoint and credential to use
Parameters:
Returns:
credential
public RoomsClientBuilder credential(AzureKeyCredential keyCredential)
Sets the AzureKeyCredential used to authenticate HTTP requests.
Parameters:
Returns:
credential
public RoomsClientBuilder credential(TokenCredential tokenCredential)
Sets the TokenCredential used to authenticate HTTP requests.
Parameters:
Returns:
endpoint
public RoomsClientBuilder endpoint(String endpoint)
Set endpoint of the service
Parameters:
Returns:
httpClient
public RoomsClientBuilder httpClient(HttpClient httpClient)
Set httpClient to use
Parameters:
Returns:
httpLogOptions
public RoomsClientBuilder httpLogOptions(HttpLogOptions logOptions)
Sets the HttpLogOptions for service requests.
Parameters:
Returns:
pipeline
public RoomsClientBuilder pipeline(HttpPipeline pipeline)
Set endpoint of the service
Parameters:
Returns:
retryOptions
public RoomsClientBuilder retryOptions(RetryOptions retryOptions)
Sets the RetryOptions for all the requests made through the client.
Parameters:
Returns:
retryPolicy
public RoomsClientBuilder retryPolicy(RetryPolicy retryPolicy)
Sets the retry policy to use (using the RetryPolicy type).
Parameters:
Returns:
serviceVersion
public RoomsClientBuilder serviceVersion(RoomsServiceVersion version)
Sets the RoomsServiceVersion that is used when making API requests.
If a service version is not provided, the service version that will be used will be the latest known service version based on the version of the client library being used. If no service version is specified, updating to a newer version of the client library will have the result of potentially moving to a newer service version.
Targeting a specific service version may also mean that the service will return an error for newer APIs.
Parameters:
Returns: