Class AzureServiceClient


  • public abstract class AzureServiceClient
    extends Object
    ServiceClient is the abstraction for accessing REST operations and their payload data types.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AzureServiceClient​(com.azure.core.http.HttpPipeline httpPipeline, com.azure.core.util.serializer.SerializerAdapter serializerAdapter, com.azure.core.management.AzureEnvironment environment)
      Creates a new instance of AzureServiceClient.
    • Constructor Detail

      • AzureServiceClient

        protected AzureServiceClient​(com.azure.core.http.HttpPipeline httpPipeline,
                                     com.azure.core.util.serializer.SerializerAdapter serializerAdapter,
                                     com.azure.core.management.AzureEnvironment environment)
        Creates a new instance of AzureServiceClient.
        Parameters:
        httpPipeline - The HttpPipline used by the client.
        serializerAdapter - The SerializerAdapter used by the client.
        environment - The AzureEnvironment used by the client.
    • Method Detail

      • getHttpPipeline

        public com.azure.core.http.HttpPipeline getHttpPipeline()
        Gets The HTTP pipeline to send requests through.
        Returns:
        the httpPipeline value.
      • getDefaultPollInterval

        public abstract Duration getDefaultPollInterval()
        Gets The default poll interval for long-running operation.
        Returns:
        the defaultPollInterval value.
      • getContext

        public com.azure.core.util.Context getContext()
        Gets default client context.
        Returns:
        the default client context.
      • mergeContext

        public com.azure.core.util.Context mergeContext​(com.azure.core.util.Context context)
        Merges default client context with provided context.
        Parameters:
        context - the context to be merged with default client context.
        Returns:
        the merged context.
      • getLroResult

        public <T,​U> com.azure.core.util.polling.PollerFlux<com.azure.core.management.polling.PollResult<T>,​U> getLroResult​(Mono<com.azure.core.http.rest.Response<Flux<ByteBuffer>>> lroInit,
                                                                                                                                        com.azure.core.http.HttpPipeline httpPipeline,
                                                                                                                                        Type pollResultType,
                                                                                                                                        Type finalResultType,
                                                                                                                                        com.azure.core.util.Context context)
        Gets long running operation result.
        Type Parameters:
        T - type of poll result.
        U - type of final result.
        Parameters:
        lroInit - the raw response of init operation.
        httpPipeline - the http pipeline.
        pollResultType - type of poll result.
        finalResultType - type of final result.
        context - the context shared by all requests.
        Returns:
        poller flux for poll result and final result.
      • getLroFinalResultOrError

        public <T,​U> Mono<U> getLroFinalResultOrError​(com.azure.core.util.polling.AsyncPollResponse<com.azure.core.management.polling.PollResult<T>,​U> response)
        Gets the final result, or an error, based on last async poll response.
        Type Parameters:
        T - type of poll result.
        U - type of final result.
        Parameters:
        response - the last async poll response.
        Returns:
        the final result, or an error.