Compartir a través de


PollResult<T> Class

  • java.lang.Object
    • com.azure.core.management.polling.PollResult<T>

Type Parameters

T

the type of the value

public final class PollResult

Type representing result (succeeded or failed result) of a long-running-poll operation.

Constructor Summary

Constructor Description
PollResult(T value)

Creates PollResult.

PollResult(PollResult.Error error)

Creates PollResult.

Method Summary

Modifier and Type Method and Description
Error getError()

Get the error description when poll-operation receives error from service.

T getValue()

Get the service returned value when poll-operation succeeded.

Methods inherited from java.lang.Object

Constructor Details

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 Details

getError

public PollResult.Error getError()

Get the error description when poll-operation receives error from service.

Returns:

the error

getValue

public T getValue()

Get the service returned value when poll-operation succeeded.

Returns:

the value

Applies to