public RestClient(String host, int port, String userName, String password, Integer httpConnectionTimeoutMs, Integer httpSocketTimeoutMs) { if (httpConnectionTimeoutMs != null) this.httpConnectionTimeoutMs = httpConnectionTimeoutMs; if (httpSocketTimeoutMs != null) this.httpSocketTimeoutMs = httpSocketTimeoutMs; init(host, port, userName, password); }
public RestClient(String uri, Integer httpConnectionTimeoutMs, Integer httpSocketTimeoutMs) { Matcher m = fullRestPattern.matcher(uri); if (!m.matches()) throw new IllegalArgumentException("URI: " + uri + " -- does not match pattern " + fullRestPattern); String user = m.group(1); String pwd = m.group(2); String host = m.group(3); String portStr = m.group(4); int port = Integer.parseInt(portStr == null ? "7070" : portStr); if (httpConnectionTimeoutMs != null) this.httpConnectionTimeoutMs = httpConnectionTimeoutMs; if (httpSocketTimeoutMs != null) this.httpSocketTimeoutMs = httpSocketTimeoutMs; init(host, port, user, pwd); }
/** * @param uri * "user:pwd@host:port" */ public RestClient(String uri) { Matcher m = fullRestPattern.matcher(uri); if (!m.matches()) throw new IllegalArgumentException("URI: " + uri + " -- does not match pattern " + fullRestPattern); String user = m.group(1); String pwd = m.group(2); String host = m.group(3); String portStr = m.group(4); int port = Integer.parseInt(portStr == null ? "7070" : portStr); init(host, port, user, pwd); }
public RestClient(String host, int port, String userName, String password, Integer httpConnectionTimeoutMs, Integer httpSocketTimeoutMs) { if (httpConnectionTimeoutMs != null) this.httpConnectionTimeoutMs = httpConnectionTimeoutMs; if (httpSocketTimeoutMs != null) this.httpSocketTimeoutMs = httpSocketTimeoutMs; init(host, port, userName, password); }
/** * @param uri * "user:pwd@host:port" */ public RestClient(String uri) { Matcher m = fullRestPattern.matcher(uri); if (!m.matches()) throw new IllegalArgumentException("URI: " + uri + " -- does not match pattern " + fullRestPattern); String user = m.group(1); String pwd = m.group(2); String host = m.group(3); String portStr = m.group(4); int port = Integer.parseInt(portStr == null ? "7070" : portStr); init(host, port, user, pwd); }
public RestClient(String uri, Integer httpConnectionTimeoutMs, Integer httpSocketTimeoutMs) { Matcher m = fullRestPattern.matcher(uri); if (!m.matches()) throw new IllegalArgumentException("URI: " + uri + " -- does not match pattern " + fullRestPattern); String user = m.group(1); String pwd = m.group(2); String host = m.group(3); String portStr = m.group(4); int port = Integer.parseInt(portStr == null ? "7070" : portStr); if (httpConnectionTimeoutMs != null) this.httpConnectionTimeoutMs = httpConnectionTimeoutMs; if (httpSocketTimeoutMs != null) this.httpSocketTimeoutMs = httpSocketTimeoutMs; init(host, port, user, pwd); }