Interface ReadonlyHttpClientConfiguration

  • All Known Implementing Classes:
    HttpClientConfiguration

    public interface ReadonlyHttpClientConfiguration
    Interface for holding HTTP Client Configuration.
    • Method Detail

      • getTimeout

        long getTimeout()
        The timeout in seconds to use for making HTTP requests.
        Returns:
        a copy of timeout
      • getNumberOfRetries

        int getNumberOfRetries()
        The number of retries to make.
        Returns:
        a copy of numberOfRetries
      • getBackOffFactor

        int getBackOffFactor()
        To use in calculation of wait time for next request in case of failure.
        Returns:
        a copy of backOffFactor
      • getRetryInterval

        long getRetryInterval()
        To use in calculation of wait time for next request in case of failure.
        Returns:
        a copy of retryInterval
      • getHttpStatusCodesToRetry

        Set<Integer> getHttpStatusCodesToRetry()
        Http status codes to retry against.
        Returns:
        a copy of httpStatusCodesToRetry
      • getHttpMethodsToRetry

        Set<HttpMethod> getHttpMethodsToRetry()
        Http methods to retry against.
        Returns:
        a copy of httpMethodsToRetry
      • getMaximumRetryWaitTime

        long getMaximumRetryWaitTime()
        The maximum wait time for overall retrying requests.
        Returns:
        a copy of maximumRetryWaitTime
      • shouldRetryOnTimeout

        boolean shouldRetryOnTimeout()
        Whether to retry on request timeout.
        Returns:
        a copy of shouldRetryOnTimeout
      • getHttpClientInstance

        okhttp3.OkHttpClient getHttpClientInstance()
        The OkHttpClient instance used to make the HTTP calls.
        Returns:
        a copy of httpClientInstance
      • shouldOverrideHttpClientConfigurations

        boolean shouldOverrideHttpClientConfigurations()
        Allow the SDK to override HTTP client instance's settings used for features like retries, timeouts etc.
        Returns:
        a copy of overrideHttpClientConfigurations