你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AsyncPollResponse<T,U> Class
- java.
lang. Object - com.
azure. core. util. polling. AsyncPollResponse<T,U>
- com.
Type Parameters
- T
The type of poll response value.
- U
The type of the final result of long-running operation.
public final class AsyncPollResponse<T,U>
AsyncPollResponse represents an event emitted by the PollerFlux<T,U> that asynchronously polls a long-running operation (LRO). An AsyncPollResponse event provides information such as the current LongRunningOperationStatus of the LRO, any value returned by the poll, as well as other useful information provided by the service. AsyncPollResponse also exposes #cancelOperation method to cancel the long-running operation from reactor operator chain and getFinalResult() method that returns final result of the long-running operation.
Method Summary
Modifier and Type | Method and Description |
---|---|
Mono<T> |
cancelOperation()
Gets a Mono whereupon subscription it cancels the remote long-running operation if cancellation is supported by the service. |
Mono<U> |
getFinalResult()
Gets a Mono whereupon subscription it fetches the final result of the long-running operation if it is supported by the service. |
Long |
getStatus()
Represents the status of the long-running operation at the time the last polling operation finished successfully. |
T |
getValue()
The value returned as a result of the last successful poll operation. |
Methods inherited from java.lang.Object
Method Details
cancelOperation
public Mono
Gets a Mono whereupon subscription it cancels the remote long-running operation if cancellation is supported by the service.
Returns:
getFinalResult
public Mono getFinalResult()
Gets a Mono whereupon subscription it fetches the final result of the long-running operation if it is supported by the service.
If the long-running operation isn't complete an empty Mono will be returned.
Returns:
getStatus
public LongRunningOperationStatus getStatus()
Represents the status of the long-running operation at the time the last polling operation finished successfully.
Returns:
getValue
public T getValue()
The value returned as a result of the last successful poll operation. This can be any custom user defined object, or null if no value was returned from the service.
Returns: