Class ConnectionOptions


  • public final class ConnectionOptions
    extends Object
    Advanced connection options to use for connections to a remote repository.
    • Field Detail

      • PARAM_USE_SYSTEM_PROPERTIES

        public static final String PARAM_USE_SYSTEM_PROPERTIES
        Boolean flag whether to use the default Java system properties for setting proxy, TLS and further options as defined by HttpClientBuilder. Default = false.
        See Also:
        Constant Field Values
      • PARAM_ALLOW_SELF_SIGNED_CERTIFICATES

        public static final String PARAM_ALLOW_SELF_SIGNED_CERTIFICATES
        Boolean flag whether to allow self-signed certificates of remote repositories. Default = false.
        See Also:
        Constant Field Values
      • PARAM_DISABLE_HOSTNAME_VERIFICATION

        public static final String PARAM_DISABLE_HOSTNAME_VERIFICATION
        Boolean flag whether to disable the host name verification against the common name of the server's certificate. Default = false.
        See Also:
        Constant Field Values
      • PARAM_PROXY_PORT

        public static final String PARAM_PROXY_PORT
        Integer value for the proxy's port. Only effective if PARAM_PROXY_HOST is used as well. If -1 or not set the default for the scheme will be used.
        See Also:
        Constant Field Values
      • PARAM_CONNECTION_TIMEOUT_MS

        public static final String PARAM_CONNECTION_TIMEOUT_MS
        The connection timeout in milliseconds as Integer. -1 for default, 0 for infinite.
        See Also:
        Constant Field Values
      • PARAM_REQUEST_TIMEOUT_MS

        public static final String PARAM_REQUEST_TIMEOUT_MS
        The request timeout in milliseconds as Integer. -1 for default, 0 for infinite.
        See Also:
        Constant Field Values
      • PARAM_SOCKET_TIMEOUT_MS

        public static final String PARAM_SOCKET_TIMEOUT_MS
        The request timeout in milliseconds as Integer. -1 for default, 0 for infinite.
        See Also:
        Constant Field Values
      • PARAM_MAX_CONNECTIONS

        public static final String PARAM_MAX_CONNECTIONS
        Optional configuration parameter: Its value defines the maximumConnectionsPerHost value on the HttpClient configuration and must be an int greater than zero.
        See Also:
        Constant Field Values
      • DEFAULT

        public static final ConnectionOptions DEFAULT
        The default connection options with regular TLS settings, without proxy and not leveraging system properties
    • Method Detail

      • isUseSystemPropertes

        public boolean isUseSystemPropertes()
      • isAllowSelfSignedCertificates

        public boolean isAllowSelfSignedCertificates()
      • isDisableHostnameVerification

        public boolean isDisableHostnameVerification()
      • getMaxConnections

        public int getMaxConnections()
      • getConnectionTimeoutMs

        public int getConnectionTimeoutMs()
      • getRequestTimeoutMs

        public int getRequestTimeoutMs()
      • getSocketTimeoutMs

        public int getSocketTimeoutMs()
      • getProxyHost

        public String getProxyHost()
      • getProxyPort

        public int getProxyPort()
      • getProxyProtocol

        public String getProxyProtocol()
      • getProxyUsername

        public String getProxyUsername()
      • getProxyPassword

        public String getProxyPassword()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toServiceFactoryParameters

        public Map<String,​String> toServiceFactoryParameters()
      • fromServiceFactoryParameters

        public static ConnectionOptions fromServiceFactoryParameters​(Map<?,​?> parameters)