Class NetworkConfiguration.Builder
-
- All Implemented Interfaces:
public final class NetworkConfiguration.BuilderThe builder for the network and retry configuration.
-
-
Constructor Summary
Constructors Constructor Description NetworkConfiguration.Builder()
-
Method Summary
Modifier and Type Method Description final NetworkConfiguration.BuildermaxRetries(Integer maxRetries)Sets the maximum amount of retries before the player throws a fatal error. final NetworkConfiguration.BuilderminimumBackOff(Long minimumBackOff)Sets the initial delay in milliseconds before a retry request occurs. final NetworkConfiguration.BuildermaximumBackOff(Long maximumBackOff)Sets the maximum amount of delay in milliseconds between retry requests. final NetworkConfiguration.BuilderuseHttpEngine(Boolean useHttpEngine)Sets whether the player should use android.net.http.HttpEngine or Cronet for its network stack, if available. final NetworkConfigurationbuild()Builds the configuration. -
-
Method Detail
-
maxRetries
final NetworkConfiguration.Builder maxRetries(Integer maxRetries)
Sets the maximum amount of retries before the player throws a fatal error.
- Parameters:
maxRetries- The maximum amount of retries.
-
minimumBackOff
final NetworkConfiguration.Builder minimumBackOff(Long minimumBackOff)
Sets the initial delay in milliseconds before a retry request occurs. Exponential backoff will be applied on this value.
- Parameters:
minimumBackOff- The initial delay in milliseconds before a retry request occurs.
-
maximumBackOff
final NetworkConfiguration.Builder maximumBackOff(Long maximumBackOff)
Sets the maximum amount of delay in milliseconds between retry requests.
- Parameters:
maximumBackOff- The maximum amount of delay in milliseconds between retry requests.
-
useHttpEngine
final NetworkConfiguration.Builder useHttpEngine(Boolean useHttpEngine)
Sets whether the player should use android.net.http.HttpEngine or Cronet for its network stack, if available.
- Parameters:
useHttpEngine- True to use a modern network stack, false otherwise.
-
build
final NetworkConfiguration build()
Builds the configuration.
-
-
-
-