1 2 package ch.ethz.ssh2; 3 4 13 14 public class HTTPProxyData implements ProxyData 15 { 16 public final String proxyHost; 17 public final int proxyPort; 18 public final String proxyUser; 19 public final String proxyPass; 20 public final String [] requestHeaderLines; 21 22 28 public HTTPProxyData(String proxyHost, int proxyPort) 29 { 30 this(proxyHost, proxyPort, null, null); 31 } 32 33 41 public HTTPProxyData(String proxyHost, int proxyPort, String proxyUser, String proxyPass) 42 { 43 this(proxyHost, proxyPort, proxyUser, proxyPass, null); 44 } 45 46 67 68 public HTTPProxyData(String proxyHost, int proxyPort, String proxyUser, String proxyPass, 69 String [] requestHeaderLines) 70 { 71 if (proxyHost == null) 72 throw new IllegalArgumentException ("proxyHost must be non-null"); 73 74 if (proxyPort < 0) 75 throw new IllegalArgumentException ("proxyPort must be non-negative"); 76 77 this.proxyHost = proxyHost; 78 this.proxyPort = proxyPort; 79 this.proxyUser = proxyUser; 80 this.proxyPass = proxyPass; 81 this.requestHeaderLines = requestHeaderLines; 82 } 83 } 84 | Popular Tags |