Class ConfigurationOverride

    • Constructor Detail

      • ConfigurationOverride

        public ConfigurationOverride()
    • Method Detail

      • apiUrl

        public ConfigurationOverride apiUrl​(java.lang.String apiUrl)
        Set the API URL for the http client.
        Parameters:
        apiUrl - The URL.
        Returns:
        This object.
      • getApiUrl

        public java.lang.String getApiUrl()
        Get the API URL that was set.
        Specified by:
        getApiUrl in interface BaseConfiguration
        Returns:
        The url.
      • credentials

        public ConfigurationOverride credentials​(Credentials credentials)
        Set the credentials.
        Parameters:
        credentials - The credentials.
        Returns:
        This object.
      • getCredentials

        public Credentials getCredentials()
        Get the configured credentials.
        Returns:
        The credentials.
      • userAgent

        public ConfigurationOverride userAgent​(java.lang.String userAgent)
        Set the user agent.
        Parameters:
        userAgent - The user agent.
        Returns:
        This object.
      • getUserAgent

        public java.lang.String getUserAgent()
        Get the user agent.
        Specified by:
        getUserAgent in interface BaseConfiguration
        Returns:
        The user agent.
      • readTimeout

        public ConfigurationOverride readTimeout​(java.time.Duration readTimeout)
        Set the read timeout for the http client.

        This is the value used by default for each request, though it can be overridden on a per-request basis with a request interceptor.

        Parameters:
        readTimeout - The read timeout used by default by the http client. Setting this value to null resets the timeout to an effectively infinite value.
        Returns:
        This object.
      • getReadTimeout

        public java.time.Duration getReadTimeout()
        Get the read timeout that was set.
        Specified by:
        getReadTimeout in interface BaseConfiguration
        Returns:
        The read timeout, or null if no timeout was set. Null represents an infinite wait time.
      • connectTimeout

        public ConfigurationOverride connectTimeout​(java.time.Duration connectTimeout)
        Sets the connect timeout (in milliseconds) for the http client.

        In the case where a new connection needs to be established, if the connection cannot be established within the given duration, then HttpClient::send throws an HttpConnectTimeoutException, or HttpClient::sendAsync completes exceptionally with an HttpConnectTimeoutException. If a new connection does not need to be established, for example if a connection can be reused from a previous request, then this timeout duration has no effect.

        Parameters:
        connectTimeout - connection timeout in milliseconds
        Returns:
        This object.
      • getConnectTimeout

        public java.time.Duration getConnectTimeout()
        Get connection timeout (in milliseconds).
        Specified by:
        getConnectTimeout in interface BaseConfiguration
        Returns:
        Timeout in milliseconds
      • minimumRetryDelay

        public ConfigurationOverride minimumRetryDelay​(java.time.Duration minimumRetryDelay)
      • additionalHeaders

        public ConfigurationOverride additionalHeaders​(java.util.Map<java.lang.String,​java.lang.String> additionalHeaders)
      • getAdditionalHeaders

        public java.util.Map<java.lang.String,​java.lang.String> getAdditionalHeaders()