Class NetworkConfiguration


  • public final class NetworkConfiguration
    extends Object
    Specifies the network configuration to use.
    • Method Detail

      • socksProxy

        public static NetworkConfiguration socksProxy​(String proxyHost,
                                                      int proxyPort)
        Returns a socks proxy configuration
        Parameters:
        proxyHost - the proxy host
        proxyPort - the proxy port
        Returns:
        the network configuration configured for socks proxy
      • connectionType

        public NetworkConfiguration.ConnectType connectionType()
        Returns the type of connection to use in order to connect
        Returns:
        the type of connection
      • maxConnectRetries

        public int maxConnectRetries()
        Returns the maximum number of retries to use when connecting. The default is 10.
        Returns:
        the maximum number of retries
      • withMaxConnectRetries

        public NetworkConfiguration withMaxConnectRetries​(int maxConnectRetries)
        Specifies the maximum number of retries to use when connecting. The default is 10
        Parameters:
        maxConnectRetries - the maximum number of retries
        Returns:
        a new network configuration with the specified number of max retries