Class TableClientBuilder

    • Constructor Detail

      • TableClientBuilder

        public TableClientBuilder()
        Creates a builder instance that is able to configure and construct TableClient and TableAsyncClient objects.
    • Method Detail

      • buildClient

        public TableClient buildClient()
        Creates a TableClient based on options set in the builder.
        Returns:
        A TableClient created from the configurations in this builder.
        Throws:
        NullPointerException - If endpoint or tableName are null.
        IllegalArgumentException - If endpoint is malformed or empty or if tableName is empty.
        IllegalStateException - If no form of authentication or endpoint have been specified or if multiple forms of authentication are provided, with the exception of sasToken + connectionString. Also thrown if endpoint and/or sasToken are set alongside a connectionString and the endpoint and/or SAS token in the latter are different than the former, respectively.
      • buildAsyncClient

        public TableAsyncClient buildAsyncClient()
        Creates a TableAsyncClient based on options set in the builder.
        Returns:
        A TableAsyncClient created from the configurations in this builder.
        Throws:
        NullPointerException - If endpoint or tableName are null.
        IllegalArgumentException - If endpoint is malformed or empty or if tableName is empty.
        IllegalStateException - If no form of authentication or endpoint have been specified or if multiple forms of authentication are provided, with the exception of sasToken + connectionString. Also thrown if endpoint and/or sasToken are set alongside a connectionString and the endpoint and/or SAS token in the latter are different than the former, respectively.
      • pipeline

        public TableClientBuilder pipeline​(com.azure.core.http.HttpPipeline pipeline)
        Sets the HttpPipeline to use for the service client. If pipeline is set, all other settings are ignored, aside from endpoint.
        Parameters:
        pipeline - HttpPipeline to use for sending service requests and receiving responses.
        Returns:
        The updated TableClientBuilder.
      • configuration

        public TableClientBuilder configuration​(com.azure.core.util.Configuration configuration)
        Sets the configuration object used to retrieve environment configuration values during building of the client.

        The default configuration store is a clone of the global configuration store, use Configuration.NONE to bypass using configuration settings during construction.

        Parameters:
        configuration - Configuration store used to retrieve environment configuration.
        Returns:
        The updated TableClientBuilder.
      • httpClient

        public TableClientBuilder httpClient​(com.azure.core.http.HttpClient httpClient)
        Sets the HttpClient to use for sending and receiving requests to and from the service.
        Parameters:
        httpClient - The HttpClient to use for requests.
        Returns:
        The updated TableClientBuilder.
      • httpLogOptions

        public TableClientBuilder httpLogOptions​(com.azure.core.http.policy.HttpLogOptions logOptions)
        Sets the logging configuration to use when sending and receiving requests to and from the service. If a logLevel is not provided, default value of HttpLogDetailLevel.NONE is set.
        Parameters:
        logOptions - The logging configuration to use when sending and receiving requests to and from the service.
        Returns:
        The updated TableClientBuilder.
      • addPolicy

        public TableClientBuilder addPolicy​(com.azure.core.http.policy.HttpPipelinePolicy pipelinePolicy)
        Adds a pipeline policy to apply on each request sent. The policy will be added after the retry policy. If the method is called multiple times, all policies will be added and their order preserved.
        Parameters:
        pipelinePolicy - A pipeline policy.
        Returns:
        The updated TableClientBuilder.
        Throws:
        NullPointerException - If pipelinePolicy is null.
      • retryPolicy

        public TableClientBuilder retryPolicy​(com.azure.core.http.policy.RetryPolicy retryPolicy)
        Sets the request RetryPolicy for all the requests made through the client. The default RetryPolicy will be used in the pipeline, if not provided.
        Parameters:
        retryPolicy - RetryPolicy.
        Returns:
        The updated TableClientBuilder.
      • clientOptions

        public TableClientBuilder clientOptions​(com.azure.core.util.ClientOptions clientOptions)
        Sets the ClientOptions such as application ID and custom headers to set on a request.
        Parameters:
        clientOptions - The ClientOptions.
        Returns:
        The updated TableClientBuilder.