Class StandardHttpRequestor.Config

java.lang.Object
com.dropbox.core.http.StandardHttpRequestor.Config
Enclosing class:
StandardHttpRequestor

public static final class StandardHttpRequestor.Config extends Object
Configuration for StandardHttpRequestor that determines how network connections to the server are established. Use this class to configure timeouts and proxy settings. Some requests may require different connection settings than others. Create multiple StandardHttpRequestor objects with different configurations to handle these requests. For example, calls to DbxUserFilesRequests.listFolderLongpoll(String,long) should use a StandardHttpRequestor with its read timeout (see StandardHttpRequestor.Config.Builder.withReadTimeout(long, java.util.concurrent.TimeUnit)) set longer than the longpoll timeout.
  • Field Details

  • Method Details

    • getProxy

      public Proxy getProxy()
      Returns the proxy configuration for network connections.
      Returns:
      proxy configuration to use for network connections.
    • getConnectTimeoutMillis

      public long getConnectTimeoutMillis()
      Returns the timeout, in milliseconds, for opening a connection to the servers. If the timeout is 0, then connect timeouts are disabled.
      Returns:
      timeout, in milliseconds, for opening connections to the servers.
    • getReadTimeoutMillis

      public long getReadTimeoutMillis()
      Returns the timeout, in milliseconds, for receiving a response from the servers. If the timeout is 0, then read timeouts are disabled.
      Returns:
      timeout, in milliseconds, for receiving a response from the server.
    • getSslSocketFactory

      @Nullable public SSLSocketFactory getSslSocketFactory()
      Returns the SSLSocketFactory if provided. This is to be used for certificate pinning and other custom SSL configurations.
      Returns:
      SSLSocketFactory or null.
    • copy

      Returns a new builder for creating a copy of this config. The builder is configured to use this config's values as its default.
      Returns:
      builder for creating a copy of this config.
    • builder

      public static StandardHttpRequestor.Config.Builder builder()
      Returns a new builder for creating a StandardHttpRequestor.Config.
      Returns:
      builder for creating an instance of this class