Class AzureServiceClient
java.lang.Object
com.azure.resourcemanager.resources.fluentcore.AzureServiceClient
ServiceClient is the abstraction for accessing REST operations and their payload data types.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAzureServiceClient(com.azure.core.http.HttpPipeline httpPipeline, com.azure.core.util.serializer.SerializerAdapter serializerAdapter, com.azure.core.management.AzureEnvironment environment) Creates a new instance ofAzureServiceClient. -
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.util.ContextGets default client context.abstract DurationGets The default poll interval for long-running operation.com.azure.core.http.HttpPipelineGets The HTTP pipeline to send requests through.<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.<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.com.azure.core.util.ContextmergeContext(com.azure.core.util.Context context) Merges default client context with provided context.
-
Constructor Details
-
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 ofAzureServiceClient.- Parameters:
httpPipeline- The HttpPipline used by the client.serializerAdapter- The SerializerAdapter used by the client.environment- The AzureEnvironment used by the client.
-
-
Method Details
-
getHttpPipeline
public com.azure.core.http.HttpPipeline getHttpPipeline()Gets The HTTP pipeline to send requests through.- Returns:
- the httpPipeline value.
-
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.
-