@Override public void setUser(String user) { delegate.setUser(user); }
private HTTPClient getHTTPClient(HTTPStoreInfo info) { String capabilitiesURL = info.getCapabilitiesURL(); // check for mock bindings. Since we are going to run this code in production as well, // guard it so that it only triggers if the MockHttpClientProvider has any active binding if (TestHttpClientProvider.testModeEnabled() && capabilitiesURL.startsWith(TestHttpClientProvider.MOCKSERVER)) { HTTPClient client = TestHttpClientProvider.get(capabilitiesURL); return client; } HTTPClient client; if (info.isUseConnectionPooling()) { client = new MultithreadedHttpClient(); if (info.getMaxConnections() > 0) { int maxConnections = info.getMaxConnections(); MultithreadedHttpClient mtClient = (MultithreadedHttpClient) client; mtClient.setMaxConnections(maxConnections); } } else { client = new SimpleHttpClient(); } String username = info.getUsername(); String password = info.getPassword(); int connectTimeout = info.getConnectTimeout(); int readTimeout = info.getReadTimeout(); client.setUser(username); client.setPassword(password); client.setConnectTimeout(connectTimeout); client.setReadTimeout(readTimeout); return client; }
http.setUser(config.getUser()); http.setPassword(config.getPassword()); int timeoutMillis = config.getTimeoutMillis();
http.setUser(config.getUser()); http.setPassword(config.getPassword()); int timeoutMillis = config.getTimeoutMillis();
@Override protected void onValidate(IValidatable validatable) { String url = (String) validatable.getValue(); try { HTTPClient client = new SimpleHttpClient(); usernamePanel.getFormComponent().processInput(); String user = usernamePanel.getFormComponent().getInput(); password.getFormComponent().processInput(); String pwd = password.getFormComponent().getInput(); if (user != null && user.length() > 0 && pwd != null && pwd.length() > 0) { client.setUser(user); client.setPassword(pwd); } WebMapServer server = new WebMapServer(new URL(url), client); server.getCapabilities(); } catch(Exception e) { error(validatable, "WMSCapabilitiesValidator.connectionFailure", Collections.singletonMap("error", e.getMessage())); } }
String pwd = password.getFormComponent().getInput(); if (user != null && user.length() > 0 && pwd != null && pwd.length() > 0) { client.setUser(user); client.setPassword(pwd);
String pwd = password.getFormComponent().getInput(); if (user != null && user.length() > 0 && pwd != null && pwd.length() > 0) { client.setUser(user); client.setPassword(pwd);
http.setUser(config.getUser()); http.setPassword(config.getPassword()); int timeoutMillis = config.getTimeoutMillis();
http.setUser(config.getUser()); http.setPassword(config.getPassword()); int timeoutMillis = config.getTimeoutMillis();