Package com.azure.core.util.polling
Class AsyncPollResponse<T,U>
java.lang.Object
com.azure.core.util.polling.AsyncPollResponse<T,U>
- Type Parameters:
T
- The type of poll response value.U
- The type of the final result of long-running operation.
AsyncPollResponse represents an event emitted by the
PollerFlux
that asynchronously polls
a long-running operation (LRO). An AsyncPollResponse event provides information such as the current
status
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 TypeMethodDescriptionGets aMono
whereupon subscription it cancels the remote long-running operation if cancellation is supported by the service.Gets aMono
whereupon subscription it fetches the final result of the long-running operation if it is supported by the service.Represents the status of the long-running operation at the time the last polling operation finished successfully.getValue()
The value returned as a result of the last successful poll operation.
-
Method Details
-
getStatus
Represents the status of the long-running operation at the time the last polling operation finished successfully.- Returns:
- A
LongRunningOperationStatus
representing the result of the poll operation.
-
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:
- T result of poll operation.
-
cancelOperation
Gets aMono
whereupon subscription it cancels the remote long-running operation if cancellation is supported by the service.- Returns:
- A
Mono
whereupon subscription it cancels the remote long-running operation if cancellation is supported by the service.
-
getFinalResult
-