public void setAuthenticationOutcome(String realm, URL tracker, boolean success) { try { this_mon.enter(); setAuthenticationOutcome( realm, tracker.getProtocol(), tracker.getHost(), tracker.getPort(), success); } finally { this_mon.exit(); } }
public PasswordAuthentication getAuthentication(String realm, URL tracker) { try { this_mon.enter(); return (getAuthentication( realm, tracker.getProtocol(), tracker.getHost(), tracker.getPort())); } finally { this_mon.exit(); } }
public static URL adjustURLForHosting(URL url_in) { if (isHosting(url_in)) { String url = url_in.getProtocol() + "://"; if (bind_ip.length() < 7) { url += "127.0.0.1"; } else { url += bind_ip; } int port = url_in.getPort(); if (port != -1) { url += ":" + url_in.getPort(); } url += url_in.getPath(); String query = url_in.getQuery(); if (query != null) { url += "?" + query; } try { return (new URL(url)); } catch (MalformedURLException e) { Debug.printStackTrace(e); } } return (url_in); }