001package org.apache.maven.repository; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022public class Proxy 023{ 024 public static final String PROXY_SOCKS5 = "SOCKS_5"; 025 026 public static final String PROXY_SOCKS4 = "SOCKS4"; 027 028 public static final String PROXY_HTTP = "HTTP"; 029 030 /** 031 * Proxy server host 032 */ 033 private String host; 034 035 /** 036 * Username used to access the proxy server 037 */ 038 private String userName; 039 040 /** 041 * Password associated with the proxy server 042 */ 043 private String password; 044 045 /** 046 * Proxy server port 047 */ 048 private int port; 049 050 /** 051 * Type of the proxy 052 */ 053 private String protocol; 054 055 /** 056 * The non-proxy hosts. Follows Java system property format: <code>*.foo.com|localhost</code>. 057 */ 058 private String nonProxyHosts; 059 060 /** 061 * For NTLM proxies, specifies the NTLM host. 062 */ 063 private String ntlmHost; 064 065 /** 066 * For NTLM proxies, specifies the NTLM domain. 067 */ 068 private String ntlmDomain; 069 070 /** 071 * Return proxy server host name. 072 * 073 * @return proxy server host name 074 */ 075 public String getHost() 076 { 077 return host; 078 } 079 080 /** 081 * Set proxy host name. 082 * 083 * @param host proxy server host name 084 */ 085 public void setHost( String host ) 086 { 087 this.host = host; 088 } 089 090 /** 091 * Get user's password used to login to proxy server. 092 * 093 * @return user's password at proxy host 094 */ 095 public String getPassword() 096 { 097 return password; 098 } 099 100 /** 101 * Set the user's password for the proxy server. 102 * 103 * @param password password to use to login to a proxy server 104 */ 105 public void setPassword( String password ) 106 { 107 this.password = password; 108 } 109 110 /** 111 * Get the proxy port. 112 * 113 * @return proxy server port 114 */ 115 public int getPort() 116 { 117 return port; 118 } 119 120 /** 121 * Set the proxy port. 122 * 123 * @param port proxy server port 124 */ 125 public void setPort( int port ) 126 { 127 this.port = port; 128 } 129 130 /** 131 * Get the proxy username. 132 * 133 * @return username for the proxy server 134 */ 135 public String getUserName() 136 { 137 return userName; 138 } 139 140 /** 141 * Set the proxy username. 142 * 143 * @param userName username for the proxy server 144 */ 145 public void setUserName( String userName ) 146 { 147 this.userName = userName; 148 } 149 150 /** 151 * Get the type of the proxy server. 152 * 153 * @return the type of the proxy server 154 */ 155 public String getProtocol() 156 { 157 return protocol; 158 } 159 160 /** 161 * @param type the type of the proxy server like <i>SOCKSv4</i> 162 */ 163 public void setProtocol( String protocol ) 164 { 165 this.protocol = protocol; 166 } 167 168 public String getNonProxyHosts() 169 { 170 return nonProxyHosts; 171 } 172 173 public void setNonProxyHosts( String nonProxyHosts ) 174 { 175 this.nonProxyHosts = nonProxyHosts; 176 } 177 178 public String getNtlmHost() 179 { 180 return ntlmHost; 181 } 182 183 public void setNtlmHost( String ntlmHost ) 184 { 185 this.ntlmHost = ntlmHost; 186 } 187 188 public void setNtlmDomain( String ntlmDomain ) 189 { 190 this.ntlmDomain = ntlmDomain; 191 } 192 193 public String getNtlmDomain() 194 { 195 return ntlmDomain; 196 } 197}