public final class AzureClient extends AzureServiceClient
Constructor and Description |
---|
AzureClient(AzureServiceClient serviceClient)
Initializes an instance of this class with customized client metadata.
|
Modifier and Type | Method and Description |
---|---|
<T> rx.Single<PollingState<T>> |
beginPostOrDeleteAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable,
Type resourceType)
Given an observable representing a deferred POST or DELETE action, this method returns
Single object,
when subscribed to it, the deferred action will be performed and emits the polling state containing information
to track the progress of the action. |
<T> rx.Single<PollingState<T>> |
beginPutOrPatchAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable,
Type resourceType)
Given an observable representing a deferred PUT or PATCH action, this method returns
Single object,
when subscribed to it, the deferred action will be performed and emits the polling state containing information
to track the progress of the action. |
<T> rx.Observable<ServiceResponse<T>> |
getPostOrDeleteResultAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable,
Type resourceType)
Handles an initial response from a POST or DELETE operation response by polling
the status of the operation asynchronously, calling the user provided callback
when the operation terminates.
|
<T,THeader> |
getPostOrDeleteResultWithHeaders(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable,
Type resourceType,
Class<THeader> headerType)
Handles an initial response from a POST or DELETE operation response by polling
the status of the operation until the long running operation terminates.
|
<T,THeader> |
getPostOrDeleteResultWithHeadersAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable,
Type resourceType,
Class<THeader> headerType)
Handles an initial response from a POST or DELETE operation response by polling
the status of the operation asynchronously, calling the user provided callback
when the operation terminates.
|
<T> rx.Observable<ServiceResponse<T>> |
getPutOrPatchResultAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable,
Type resourceType)
Handles an initial response from a PUT or PATCH operation response by polling the status of the operation
asynchronously, once the operation finishes emits the final response.
|
<T,THeader> |
getPutOrPatchResultWithHeaders(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable,
Type resourceType,
Class<THeader> headerType)
Handles an initial response from a PUT or PATCH operation response by polling
the status of the operation until the long running operation terminates.
|
<T,THeader> |
getPutOrPatchResultWithHeadersAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable,
Type resourceType,
Class<THeader> headerType)
Handles an initial response from a PUT or PATCH operation response by polling
the status of the operation asynchronously, calling the user provided callback
when the operation terminates.
|
Integer |
longRunningOperationRetryTimeout()
Gets the interval time between two long running operation polls.
|
<T> rx.Observable<PollingState<T>> |
pollAsync(PollingState<T> pollingState,
Type resourceType)
Given a polling state representing state of an LRO operation, this method returns
Observable object,
when subscribed to it, a series of polling will be performed and emits each polling state to downstream. |
<T> rx.Single<PollingState<T>> |
pollSingleAsync(PollingState<T> pollingState,
Type resourceType)
Given a polling state representing state of a LRO operation, this method returns
Single object,
when subscribed to it, a single poll will be performed and emits the latest polling state. |
void |
setLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout)
Sets the interval time between two long running operation polls.
|
userAgent
httpClient, restClient, retrofit, serializerAdapter
public AzureClient(AzureServiceClient serviceClient)
serviceClient
- the caller client that initiates the asynchronous request.public Integer longRunningOperationRetryTimeout()
public void setLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout)
longRunningOperationRetryTimeout
- the time in seconds. Set to any negative value to let AzureClient ignore this setting.public <T,THeader> ServiceResponseWithHeaders<T,THeader> getPutOrPatchResultWithHeaders(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable, Type resourceType, Class<THeader> headerType) throws CloudException, InterruptedException, IOException
T
- the return type of the callerTHeader
- the type of the response headerobservable
- the initial observable from the PUT or PATCH operation.resourceType
- the java.lang.reflect.Type of the resource.headerType
- the type of the response headerCloudException
- REST exceptionInterruptedException
- interrupted exceptionIOException
- thrown by deserializationpublic <T> rx.Observable<ServiceResponse<T>> getPutOrPatchResultAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable, Type resourceType)
T
- the return type of the caller.observable
- the initial observable from the PUT or PATCH operation.resourceType
- the java.lang.reflect.Type of the resource.public <T> rx.Single<PollingState<T>> beginPutOrPatchAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable, Type resourceType)
Single
object,
when subscribed to it, the deferred action will be performed and emits the polling state containing information
to track the progress of the action.
Note: this method does not implicitly introduce concurrency, by default the deferred action will be executed
in scheduler (if any) set for the provided observable.T
- the type of the resourceobservable
- an observable representing a deferred PUT or PATCH operation.resourceType
- the java.lang.reflect.Type of the resource.public <T,THeader> rx.Observable<ServiceResponseWithHeaders<T,THeader>> getPutOrPatchResultWithHeadersAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable, Type resourceType, Class<THeader> headerType)
T
- the return type of the callerTHeader
- the type of the response headerobservable
- the initial response from the PUT or PATCH operation.resourceType
- the java.lang.reflect.Type of the resource.headerType
- the type of the response headerpublic <T,THeader> ServiceResponseWithHeaders<T,THeader> getPostOrDeleteResultWithHeaders(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable, Type resourceType, Class<THeader> headerType) throws CloudException, InterruptedException, IOException
T
- the return type of the callerTHeader
- the type of the response headerobservable
- the initial observable from the POST or DELETE operation.resourceType
- the java.lang.reflect.Type of the resource.headerType
- the type of the response headerCloudException
- REST exceptionInterruptedException
- interrupted exceptionIOException
- thrown by deserializationpublic <T> rx.Observable<ServiceResponse<T>> getPostOrDeleteResultAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable, Type resourceType)
T
- the return type of the caller.observable
- the initial response from the POST or DELETE operation.resourceType
- the java.lang.reflect.Type of the resource.public <T> rx.Single<PollingState<T>> beginPostOrDeleteAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable, Type resourceType)
Single
object,
when subscribed to it, the deferred action will be performed and emits the polling state containing information
to track the progress of the action.T
- the type of the resourceobservable
- an observable representing a deferred PUT or PATCH operation.resourceType
- the java.lang.reflect.Type of the resource.public <T,THeader> rx.Observable<ServiceResponseWithHeaders<T,THeader>> getPostOrDeleteResultWithHeadersAsync(rx.Observable<retrofit2.Response<okhttp3.ResponseBody>> observable, Type resourceType, Class<THeader> headerType)
T
- the return type of the callerTHeader
- the type of the response headerobservable
- the initial observable from the POST or DELETE operation.resourceType
- the java.lang.reflect.Type of the resource.headerType
- the type of the response headerpublic <T> rx.Single<PollingState<T>> pollSingleAsync(PollingState<T> pollingState, Type resourceType)
Single
object,
when subscribed to it, a single poll will be performed and emits the latest polling state. A poll will be
performed only if the current polling state is not in terminal state.
Note: this method does not implicitly introduce concurrency, by default the deferred action will be executed
in scheduler (if any) set for the provided observable.T
- the type of the resourcepollingState
- the current polling stateresourceType
- the java.lang.reflect.Type of the resource.public <T> rx.Observable<PollingState<T>> pollAsync(PollingState<T> pollingState, Type resourceType)
Observable
object,
when subscribed to it, a series of polling will be performed and emits each polling state to downstream.
Polling will completes when the operation finish with success, failure or exception.T
- the type of the resourcepollingState
- the current polling stateresourceType
- the java.lang.reflect.Type of the resource.Copyright © 2019. All rights reserved.