View Javadoc
1   package org.apache.maven.repository;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  public class Proxy
23  {
24      public static final String PROXY_SOCKS5 = "SOCKS_5";
25  
26      public static final String PROXY_SOCKS4 = "SOCKS4";
27  
28      public static final String PROXY_HTTP = "HTTP";
29  
30      /**
31       * Proxy server host
32       */
33      private String host;
34  
35      /**
36       * Username used to access the proxy server
37       */
38      private String userName;
39  
40      /**
41       * Password associated with the proxy server
42       */
43      private String password;
44  
45      /**
46       * Proxy server port
47       */
48      private int port;
49  
50      /**
51       * Type of the proxy
52       */
53      private String protocol;
54  
55      /**
56       * The non-proxy hosts. Follows Java system property format: <code>*.foo.com|localhost</code>.
57       */
58      private String nonProxyHosts;
59  
60      /**
61       * For NTLM proxies, specifies the NTLM host.
62       */
63      private String ntlmHost;
64  
65      /**
66       * For NTLM proxies, specifies the NTLM domain.
67       */
68      private String ntlmDomain;
69  
70      /**
71       * Return proxy server host name.
72       *
73       * @return proxy server host name
74       */
75      public String getHost()
76      {
77          return host;
78      }
79  
80      /**
81       * Set proxy host name.
82       *
83       * @param host proxy server host name
84       */
85      public void setHost( String host )
86      {
87          this.host = host;
88      }
89  
90      /**
91       * Get user's password used to login to proxy server.
92       *
93       * @return user's password at proxy host
94       */
95      public String getPassword()
96      {
97          return password;
98      }
99  
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 }