Class PollingStrategyOptions

java.lang.Object
com.azure.core.util.polling.PollingStrategyOptions

public final class PollingStrategyOptions extends Object
Options to configure polling strategy.
  • Constructor Details

    • PollingStrategyOptions

      public PollingStrategyOptions(HttpPipeline httpPipeline)
      The HttpPipeline to use for polling and getting the final result of the long-running operation.
      Parameters:
      httpPipeline - HttpPipeline to use for polling and getting the final result of the long-running operation.
      Throws:
      NullPointerException - if httpPipeline is null.
  • Method Details

    • getHttpPipeline

      public HttpPipeline getHttpPipeline()
      Returns HttpPipeline to use for polling and getting the final result of the long-running operation.
      Returns:
      HttpPipeline to use for polling and getting the final result of the long-running operation.
    • getEndpoint

      public String getEndpoint()
      Returns the endpoint that will be used as prefix if the service response returns a relative path for getting the long-running operation status and final result.
      Returns:
      the endpoint that will be used as prefix if the service response returns a relative path for getting the long-running operation status and final result.
    • setEndpoint

      public PollingStrategyOptions setEndpoint(String endpoint)
      Sets the endpoint that will be used as prefix if the service response returns a relative path for getting the long-running operation status and final result.
      Parameters:
      endpoint - the endpoint that will be used as prefix if the service response returns a relative path for getting the long-running operation status and final result.
      Returns:
      the updated PollingStrategyOptions instance.
    • getSerializer

      public ObjectSerializer getSerializer()
      Returns the serializer to use for serializing and deserializing the request and response.
      Returns:
      the serializer to use for serializing and deserializing the request and response.
    • setSerializer

      public PollingStrategyOptions setSerializer(ObjectSerializer serializer)
      Set the serializer to use for serializing and deserializing the request and response.
      Parameters:
      serializer - the serializer to use for serializing and deserializing the request and response.
      Returns:
      the updated PollingStrategyOptions instance.
    • getContext

      public Context getContext()
      Returns the context to use for sending the request using the getHttpPipeline().
      Returns:
      the context to use for sending the request using the getHttpPipeline().
    • setContext

      public PollingStrategyOptions setContext(Context context)
      Sets the context to use for sending the request using the getHttpPipeline().
      Parameters:
      context - the context to use for sending the request using the getHttpPipeline().
      Returns:
      the updated PollingStrategyOptions instance.
    • getServiceVersion

      public String getServiceVersion()
      Returns the service version that will be added as query param to each polling request and final result request URL. If the request URL already contains a service version, it will be replaced by the service version set in this constructor.
      Returns:
      the service version to use for polling and getting the final result.
    • setServiceVersion

      public PollingStrategyOptions setServiceVersion(String serviceVersion)
      Sets the service version that will be added as query param to each polling request and final result request URL. If the request URL already contains a service version, it will be replaced by the service version set in this constructor.
      Parameters:
      serviceVersion - the service version to use for polling and getting the final result.
      Returns:
      the updated PollingStrategyOptions instance.