public BuilderImpl setProperties(Properties p)
    {
        this.endpoint = getConfigProperty(p, API_ENDPOINT)
                .or(getConfigProperty(p, "endpoint"))
                .or(endpoint);
        this.port = getConfigPropertyInt(p, API_PORT)
                .or(getConfigPropertyInt(p, "port"))
                .or(port);
        this.useSSL = getConfigPropertyBoolean(p, USESSL)
                .or(getConfigPropertyBoolean(p, "usessl"))
                .or(useSSL);
        this.apiKey = getConfigProperty(p, APIKEY)
                .or(getConfigProperty(p, "apikey"))
                .or(apiKey);
        this.user = getConfigProperty(p, USER)
                .or(getConfigProperty(p, "user"))
                .or(user);
        this.password = getConfigProperty(p, PASSOWRD)
                .or(getConfigProperty(p, "password"))
                .or(password);

        // proxy
        boolean hasProxy = false;
        ProxyConfig.ProxyConfigBuilder proxyConfig;
        if (proxy.isPresent()) {
            hasProxy = true;
            proxyConfig = new ProxyConfig.ProxyConfigBuilder(proxy.get());
        }
        else {
            proxyConfig = new ProxyConfig.ProxyConfigBuilder();
        }
        Optional<String> proxyHost = getConfigProperty(p, PROXY_HOST);
        Optional<Integer> proxyPort = getConfigPropertyInt(p, PROXY_PORT);
        Optional<String> proxyUseSSL = getConfigProperty(p, PROXY_USESSL);
        Optional<String> proxyUser = getConfigProperty(p, PROXY_USER);
        Optional<String> proxyPassword = getConfigProperty(p, PROXY_PASSWORD);
        if (proxyHost.isPresent()) {
            hasProxy = true;
            proxyConfig.setHost(proxyHost.get());
        }
        if (proxyPort.isPresent()) {
            hasProxy = true;
            proxyConfig.setPort(proxyPort.get());
        }
        if (proxyUseSSL.isPresent()) {
            hasProxy = true;
            proxyConfig.useSSL(Boolean.parseBoolean(proxyUseSSL.get()));
        }
        if (proxyUser.isPresent()) {
            hasProxy = true;
            proxyConfig.setUser(proxyUser.get());
        }
        if (proxyPassword.isPresent()) {
            hasProxy = true;
            proxyConfig.setPassword(proxyPassword.get());
        }
        this.proxy = Optional.fromNullable(hasProxy ? proxyConfig.createProxyConfig() : null);

        // http client parameter
        this.retryLimit = getConfigPropertyInt(p, RETRY_LIMIT).or(retryLimit);
        this.retryInitialIntervalMillis = getConfigPropertyInt(p, RETRY_INITIAL_INTERVAL_MILLIS).or(retryInitialIntervalMillis);
        this.retryMaxIntervalMillis = getConfigPropertyInt(p, RETRY_MAX_INTERVAL_MILLIS).or(retryMaxIntervalMillis);
        this.retryMultiplier = getConfigPropertyDouble(p, RETRY_MULTIPLIER).or(retryMultiplier);
        this.connectTimeoutMillis = getConfigPropertyInt(p, CONNECT_TIMEOUT_MILLIS).or(connectTimeoutMillis);
        this.readTimeoutMillis = getConfigPropertyInt(p, READ_TIMEOUT_MILLIS).or(readTimeoutMillis);
        this.connectionPoolSize = getConfigPropertyInt(p, CONNECTION_POOL_SIZE).or(connectionPoolSize);

        return self();
    }
public BuilderImpl setProperties ( Properties p ) { this . endpoint = getConfigProperty ( p , API_ENDPOINT ) . or ( getConfigProperty ( p , "endpoint" ) ) . or ( endpoint ) ; this . port = getConfigPropertyInt ( p , API_PORT ) . or ( getConfigPropertyInt ( p , "port" ) ) . or ( port ) ; this . useSSL = getConfigPropertyBoolean ( p , USESSL ) . or ( getConfigPropertyBoolean ( p , "usessl" ) ) . or ( useSSL ) ; this . apiKey = getConfigProperty ( p , APIKEY ) . or ( getConfigProperty ( p , "apikey" ) ) . or ( apiKey ) ; this . user = getConfigProperty ( p , USER ) . or ( getConfigProperty ( p , "user" ) ) . or ( user ) ; this . password = getConfigProperty ( p , PASSOWRD ) . or ( getConfigProperty ( p , "password" ) ) . or ( password ) ; boolean hasProxy = false ; ProxyConfig . ProxyConfigBuilder proxyConfig ; if ( proxy . isPresent ( ) ) { hasProxy = true ; proxyConfig = new ProxyConfig . ProxyConfigBuilder ( proxy . get ( ) ) ; } else { proxyConfig = new ProxyConfig . ProxyConfigBuilder ( ) ; } Optional < String > proxyHost = getConfigProperty ( p , PROXY_HOST ) ; Optional < Integer > proxyPort = getConfigPropertyInt ( p , PROXY_PORT ) ; Optional < String > proxyUseSSL = getConfigProperty ( p , PROXY_USESSL ) ; Optional < String > proxyUser = getConfigProperty ( p , PROXY_USER ) ; Optional < String > proxyPassword = getConfigProperty ( p , PROXY_PASSWORD ) ; if ( proxyHost . isPresent ( ) ) { hasProxy = true ; proxyConfig . setHost ( proxyHost . get ( ) ) ; } if ( proxyPort . isPresent ( ) ) { hasProxy = true ; proxyConfig . setPort ( proxyPort . get ( ) ) ; } if ( proxyUseSSL . isPresent ( ) ) { hasProxy = true ; proxyConfig . useSSL ( Boolean . parseBoolean ( proxyUseSSL . get ( ) ) ) ; } if ( proxyUser . isPresent ( ) ) { hasProxy = true ; proxyConfig . setUser ( proxyUser . get ( ) ) ; } if ( proxyPassword . isPresent ( ) ) { hasProxy = true ; proxyConfig . setPassword ( proxyPassword . get ( ) ) ; } this . proxy = Optional . fromNullable ( hasProxy ? proxyConfig . createProxyConfig ( ) : null ) ; this . retryLimit = getConfigPropertyInt ( p , RETRY_LIMIT ) . or ( retryLimit ) ; this . retryInitialIntervalMillis = getConfigPropertyInt ( p , RETRY_INITIAL_INTERVAL_MILLIS ) . or ( retryInitialIntervalMillis ) ; this . retryMaxIntervalMillis = getConfigPropertyInt ( p , RETRY_MAX_INTERVAL_MILLIS ) . or ( retryMaxIntervalMillis ) ; this . retryMultiplier = getConfigPropertyDouble ( p , RETRY_MULTIPLIER ) . or ( retryMultiplier ) ; this . connectTimeoutMillis = getConfigPropertyInt ( p , CONNECT_TIMEOUT_MILLIS ) . or ( connectTimeoutMillis ) ; this . readTimeoutMillis = getConfigPropertyInt ( p , READ_TIMEOUT_MILLIS ) . or ( readTimeoutMillis ) ; this . connectionPoolSize = getConfigPropertyInt ( p , CONNECTION_POOL_SIZE ) . or ( connectionPoolSize ) ; return self ( ) ; }
Override the TDClient configuration with the given Properties

@param p
@return