Class HttpClientOptions

java.lang.Object
com.datastax.astra.client.core.http.HttpClientOptions
All Implemented Interfaces:
Cloneable

public class HttpClientOptions extends Object implements Cloneable
Options to set up http Client.
  • Field Details

    • DEFAULT_CALLER

      public static final Caller DEFAULT_CALLER
      Default caller name.
    • DEFAULT_RETRY_COUNT

      public static final int DEFAULT_RETRY_COUNT
      Default retry count.
      See Also:
    • DEFAULT_RETRY_DELAY_MILLIS

      public static final int DEFAULT_RETRY_DELAY_MILLIS
      Default retry delay.
      See Also:
  • Constructor Details

    • HttpClientOptions

      public HttpClientOptions()
      Default constructor.
  • Method Details

    • addCaller

      public void addCaller(Caller caller)
      Add a caller.
      Parameters:
      caller - caller to add.
    • getCallers

      public List<Caller> getCallers()
      Gets callers
      Returns:
      value of callers
    • httpRetries

      public HttpClientOptions httpRetries(int i, Duration duration)
      Set the number of retries and the delay between each retry.
      Parameters:
      i - number of retries
      duration - delay between each retry
      Returns:
      this
    • getRetryCount

      public int getRetryCount()
      Gets retryCount
      Returns:
      value of retryCount
    • getRetryDelay

      public Duration getRetryDelay()
      Gets retryDelay
      Returns:
      value of retryDelay
    • getHttpVersion

      public HttpClient.Version getHttpVersion()
      Gets httpVersion
      Returns:
      value of httpVersion
    • getHttpRedirect

      public HttpClient.Redirect getHttpRedirect()
      Gets httpRedirect
      Returns:
      value of httpRedirect
    • getHttpProxy

      public HttpProxy getHttpProxy()
      Gets proxy
      Returns:
      value of proxy
    • clone

      public HttpClientOptions clone()
      Overrides:
      clone in class Object