KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > components > net > DefaultHTTPTransportClientProperties


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
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 org.apache.axis.components.net;
17
18 import org.apache.axis.AxisProperties;
19
20
21 /**
22  * @author Richard A. Sitze
23  */

24 public class DefaultHTTPTransportClientProperties
25     implements TransportClientProperties {
26         
27     private static final String JavaDoc emptyString = "";
28
29     protected String JavaDoc proxyHost = null;
30     protected String JavaDoc nonProxyHosts = null;
31     protected String JavaDoc proxyPort = null;
32     protected String JavaDoc proxyUser = null;
33     protected String JavaDoc proxyPassword = null;
34
35
36     /**
37      * @see org.apache.axis.components.net.TransportClientProperties#getProxyHost()
38      */

39     public String JavaDoc getProxyHost() {
40         if (proxyHost == null) {
41             proxyHost = AxisProperties.getProperty("http.proxyHost");
42             if (proxyHost == null)
43                 proxyHost = emptyString;
44         }
45         return proxyHost;
46     }
47
48     /**
49      * @see org.apache.axis.components.net.TransportClientProperties#getNonProxyHosts()
50      */

51     public String JavaDoc getNonProxyHosts() {
52         if (nonProxyHosts == null) {
53             nonProxyHosts = AxisProperties.getProperty("http.nonProxyHosts");
54             if (nonProxyHosts == null)
55                 nonProxyHosts = emptyString;
56         }
57         return nonProxyHosts;
58     }
59
60     /**
61      * @see org.apache.axis.components.net.TransportClientProperties#getPort()
62      */

63     public String JavaDoc getProxyPort() {
64         if (proxyPort == null) {
65             proxyPort = AxisProperties.getProperty("http.proxyPort");
66             if (proxyPort == null)
67                 proxyPort = emptyString;
68         }
69         return proxyPort;
70     }
71
72     /**
73      * @see org.apache.axis.components.net.TransportClientProperties#getProxyUser()
74      */

75     public String JavaDoc getProxyUser() {
76         if (proxyUser == null) {
77             proxyUser = AxisProperties.getProperty("http.proxyUser");
78             if (proxyUser == null)
79                 proxyUser = emptyString;
80         }
81         return proxyUser;
82     }
83
84     /**
85      * @see org.apache.axis.components.net.TransportClientProperties#getProxyPassword()
86      */

87     public String JavaDoc getProxyPassword() {
88         if (proxyPassword == null) {
89             proxyPassword = AxisProperties.getProperty("http.proxyPassword");
90             if (proxyPassword == null)
91                 proxyPassword = emptyString;
92         }
93         return proxyPassword;
94     }
95 }
96
Popular Tags