Package com.azure.core.util.polling
Class PollingStrategyOptions
java.lang.Object
com.azure.core.util.polling.PollingStrategyOptions
Options to configure polling strategy.
-
Constructor Summary
ConstructorDescriptionPollingStrategyOptions
(HttpPipeline httpPipeline) TheHttpPipeline
to use for polling and getting the final result of the long-running operation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the context to use for sending the request using thegetHttpPipeline()
.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.ReturnsHttpPipeline
to use for polling and getting the final result of the long-running operation.Returns the serializer to use for serializing and deserializing the request and response.Returns the service version that will be added as query param to each polling request and final result request URL.setContext
(Context context) Sets the context to use for sending the request using thegetHttpPipeline()
.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.setSerializer
(ObjectSerializer serializer) Set the serializer to use for serializing and deserializing the request and response.setServiceVersion
(String serviceVersion) Sets the service version that will be added as query param to each polling request and final result request URL.
-
Constructor Details
-
PollingStrategyOptions
TheHttpPipeline
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
- ifhttpPipeline
is null.
-
-
Method Details
-
getHttpPipeline
ReturnsHttpPipeline
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
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
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
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
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
Returns the context to use for sending the request using thegetHttpPipeline()
.- Returns:
- the context to use for sending the request using the
getHttpPipeline()
.
-
setContext
Sets the context to use for sending the request using thegetHttpPipeline()
.- Parameters:
context
- the context to use for sending the request using thegetHttpPipeline()
.- Returns:
- the updated
PollingStrategyOptions
instance.
-
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
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.
-