View Javadoc

1   /*
2    * Copyright 2012 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.smartics.ci.comm;
17  
18  /**
19   * The credentials needed to authenticate against the proxy to get access to the
20   * network.
21   */
22  public class ProxyCredentials extends Credentials
23  {
24    // ********************************* Fields *********************************
25  
26    /**
27     * The name of the client that uses the proxy, aka the host name of the
28     * computer from that you want to make the connection.
29     */
30    private final String clientName;
31  
32    /**
33     * The domain (windows NT-Domain) the user belongs. Used to connect to a host
34     * using the proxy.
35     */
36    private final String domain;
37  
38    // --- constants ------------------------------------------------------------
39  
40    // --- members --------------------------------------------------------------
41  
42    // ****************************** Initializer *******************************
43  
44    // ****************************** Constructors ******************************
45  
46    /**
47     * Constructor.
48     *
49     * @param userName the name of the user to use to get access.
50     * @param password the password for the user.
51     * @param clientName the name of the client that uses the proxy, aka the host
52     *          name of the computer from that you want to make the connection.
53     * @param domain the domain (windows NT-Domain) the user belongs.
54     * @see de.smartics.ci.comm.Credentials#Credentials(java.lang.String,
55     *      java.lang.String)
56     */
57    public ProxyCredentials(final String userName, final String password,
58        final String clientName, final String domain)
59    {
60      super(userName, password);
61      this.clientName = clientName;
62      this.domain = domain;
63    }
64  
65    // ****************************** Inner Classes *****************************
66  
67    // ********************************* Methods ********************************
68  
69    // --- init -----------------------------------------------------------------
70  
71    // --- get&set --------------------------------------------------------------
72  
73    /**
74     * Returns the name of the client that uses the proxy, aka the host name of
75     * the computer from that you want to make the connection.
76     *
77     * @return the name of the client that uses the proxy, aka the host name of
78     *         the computer from that you want to make the connection.
79     */
80    public String getClientName()
81    {
82      return clientName;
83    }
84  
85    /**
86     * Returns the domain (windows NT-Domain) the user belongs. Used to connect to
87     * a host using the proxy.
88     *
89     * @return the domain (windows NT-Domain) the user belongs.
90     */
91    public String getDomain()
92    {
93      return domain;
94    }
95  
96    // --- business -------------------------------------------------------------
97  
98    // --- object basics --------------------------------------------------------
99  
100 }