AzureServiceClient Class

  • java.lang.Object
    • com.azure.resourcemanager.resources.fluentcore.AzureServiceClient

public abstract class AzureServiceClient

ServiceClient is the abstraction for accessing REST operations and their payload data types.

Constructor Summary

Modifier Constructor Description
protected AzureServiceClient(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, AzureEnvironment environment)

Creates a new instance of AzureServiceClient.

Method Summary

Modifier and Type Method and Description
Mono<U> <T,U>getLroFinalResultOrError(AsyncPollResponse<PollResult<T>,U> response)

Gets the final result, or an error, based on last async poll response.

PollerFlux<PollResult<T>,U> <T,U>getLroResult(Mono<Response<Flux<ByteBuffer>>> lroInit, HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context)

Gets long running operation result.

Context getContext()

Gets default client context.

abstract Duration getDefaultPollInterval()

Gets The default poll interval for long-running operation.

HttpPipeline getHttpPipeline()

Gets The HTTP pipeline to send requests through.

Context mergeContext(Context context)

Merges default client context with provided context.

Methods inherited from java.lang.Object

Constructor Details

AzureServiceClient

protected AzureServiceClient(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, 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 Details

<T,U>getLroFinalResultOrError

public Mono getLroFinalResultOrError(AsyncPollResponse<>,U> response)

Gets the final result, or an error, based on last async poll response.

Parameters:

response - the last async poll response.

Returns:

the final result, or an error.

<T,U>getLroResult

public PollerFlux<>,U> getLroResult(Mono<><>>> lroInit, HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context)

Gets long running operation 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.

getContext

public Context getContext()

Gets default client context.

Returns:

the default client context.

getDefaultPollInterval

public abstract Duration getDefaultPollInterval()

Gets The default poll interval for long-running operation.

Returns:

the defaultPollInterval value.

getHttpPipeline

public HttpPipeline getHttpPipeline()

Gets The HTTP pipeline to send requests through.

Returns:

the httpPipeline value.

mergeContext

public Context mergeContext(Context context)

Merges default client context with provided context.

Parameters:

context - the context to be merged with default client context.

Returns:

the merged context.

Applies to