Class PollResult<T>
- java.lang.Object
-
- com.azure.core.management.polling.PollResult<T>
-
- Type Parameters:
T- the type of the value
public final class PollResult<T> extends Object
Type representing result (succeeded or failed result) of a long-running-poll operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPollResult.ErrorType represents the error that poll-operation received from the service.
-
Constructor Summary
Constructors Constructor Description PollResult(PollResult.Error error)Creates PollResult.PollResult(T value)Creates PollResult.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PollResult.ErrorgetError()Get the error description when poll-operation receives error from service.TgetValue()Get the service returned value when poll-operation succeeded.
-
-
-
Constructor Detail
-
PollResult
public PollResult(T value)
Creates PollResult.- Parameters:
value- the service returned value for a succeeded poll operation
-
PollResult
public PollResult(PollResult.Error error)
Creates PollResult.- Parameters:
error- describes the error that poll-operation received from the service
-
-
Method Detail
-
getValue
public T getValue()
Get the service returned value when poll-operation succeeded.- Returns:
- the value
-
getError
public PollResult.Error getError()
Get the error description when poll-operation receives error from service.- Returns:
- the error
-
-