Source Code Cross Referenced for HttpTransportProperties.java in  » Web-Services-AXIS2 » kernal » org » apache » axis2 » transport » http » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Services AXIS2 » kernal » org.apache.axis2.transport.http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements. See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership. The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License. You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied. See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.
018:         */
019:        package org.apache.axis2.transport.http;
020:
021:        import org.apache.commons.httpclient.HttpVersion;
022:        import org.apache.commons.httpclient.auth.AuthPolicy;
023:        import org.apache.commons.httpclient.auth.AuthScope;
024:
025:        import java.util.List;
026:        import java.util.Properties;
027:
028:        /**
029:         * Utility bean for setting transport properties in runtime.
030:         */
031:        public class HttpTransportProperties {
032:            protected boolean chunked;
033:            protected HttpVersion httpVersion;
034:            protected String protocol;
035:
036:            public HttpTransportProperties() {
037:            }
038:
039:            public boolean getChunked() {
040:                return chunked;
041:            }
042:
043:            public HttpVersion getHttpVersion() {
044:                return httpVersion;
045:            }
046:
047:            public String getProtocol() {
048:                return protocol;
049:            }
050:
051:            public void setChunked(boolean chunked) {
052:                this .chunked = chunked;
053:            }
054:
055:            public void setHttpVersion(HttpVersion httpVerion) {
056:                this .httpVersion = httpVerion;
057:            }
058:
059:            public void setProtocol(String protocol) {
060:                this .protocol = protocol;
061:            }
062:
063:            public static class ProxyProperties {
064:                protected int proxyPort = -1;
065:                protected String domain = null;
066:                protected String passWord = null;
067:                protected String proxyHostName = null;
068:                protected String userName = null;
069:
070:                public ProxyProperties() {
071:                }
072:
073:                public String getDomain() {
074:                    return domain;
075:                }
076:
077:                public String getPassWord() {
078:                    return passWord;
079:                }
080:
081:                public String getProxyHostName() {
082:                    return proxyHostName;
083:                }
084:
085:                public int getProxyPort() {
086:                    return proxyPort;
087:                }
088:
089:                public String getUserName() {
090:                    return userName;
091:                }
092:
093:                public void setDomain(String domain) {
094:                    this .domain = domain;
095:                }
096:
097:                public void setPassWord(String passWord) {
098:                    this .passWord = passWord;
099:                }
100:
101:                public void setProxyName(String proxyHostName) {
102:                    this .proxyHostName = proxyHostName;
103:                }
104:
105:                public void setProxyPort(int proxyPort) {
106:                    this .proxyPort = proxyPort;
107:                }
108:
109:                public void setUserName(String userName) {
110:                    this .userName = userName;
111:                }
112:            }
113:
114:            /*
115:            This class is responsible for holding all the necessary information needed for NTML, Digest
116:            and Basic Authentication. Authentication itself is handled by httpclient. User doesn't need to
117:            warry about what authentication mechanism it uses. Axis2 uses httpclinet's default authentication
118:            patterns.
119:             */
120:            public static class Authenticator {
121:                /*host that needed to be authenticated with*/
122:                private String host;
123:                /*port of the host that needed to be authenticated with*/
124:                private int port = AuthScope.ANY_PORT;
125:                /*Realm for authentication scope*/
126:                private String realm = AuthScope.ANY_REALM;
127:                /*Domain needed by NTCredentials for NT Domain*/
128:                private String domain;
129:                /*User for authenticate*/
130:                private String username;
131:                /*Password of the user for authenticate*/
132:                private String password;
133:                /* Switch to use preemptive authentication or not*/
134:                private boolean preemptive = false;
135:                /* if Authentication scheme needs retry just turn on the following flag */
136:                private boolean allowedRetry = false;
137:                /* Changing the priorty or adding a custom AuthPolicy*/
138:                private List authSchemes;
139:
140:                /* Default Auth Schems*/
141:                public static final String NTLM = AuthPolicy.NTLM;
142:                public static final String DIGEST = AuthPolicy.DIGEST;
143:                public static final String BASIC = AuthPolicy.BASIC;
144:
145:                public String getHost() {
146:                    return host;
147:                }
148:
149:                public void setHost(String host) {
150:                    this .host = host;
151:                }
152:
153:                public int getPort() {
154:                    return port;
155:                }
156:
157:                public void setPort(int port) {
158:                    this .port = port;
159:                }
160:
161:                public String getRealm() {
162:                    return realm;
163:                }
164:
165:                public void setRealm(String realm) {
166:                    this .realm = realm;
167:                }
168:
169:                public String getUsername() {
170:                    return username;
171:                }
172:
173:                public void setUsername(String username) {
174:                    this .username = username;
175:                }
176:
177:                public String getPassword() {
178:                    return password;
179:                }
180:
181:                public void setPassword(String password) {
182:                    this .password = password;
183:                }
184:
185:                public void setPreemptiveAuthentication(boolean preemptive) {
186:                    this .preemptive = preemptive;
187:                }
188:
189:                public boolean getPreemptiveAuthentication() {
190:                    return this .preemptive;
191:                }
192:
193:                public String getDomain() {
194:                    return domain;
195:                }
196:
197:                public void setDomain(String domain) {
198:                    this .domain = domain;
199:                }
200:
201:                public void setAuthSchemes(List authSchemes) {
202:                    this .authSchemes = authSchemes;
203:                }
204:
205:                public List getAuthSchemes() {
206:                    return this .authSchemes;
207:                }
208:
209:                public void setAllowedRetry(boolean allowedRetry) {
210:                    this .allowedRetry = allowedRetry;
211:                }
212:
213:                public boolean isAllowedRetry() {
214:                    return this .allowedRetry;
215:                }
216:            }
217:
218:            /**
219:             * @deprecated org.apache.axis2.transport.http.HttpTransportProperties.MailProperties has been
220:             * deprecated and user are encourage the use of java.util.Properties instead.  
221:             */
222:            public static class MailProperties {
223:                final Properties mailProperties = new Properties();
224:
225:                private String password;
226:
227:                public void addProperty(String key, String value) {
228:                    mailProperties.put(key, value);
229:                }
230:
231:                public void deleteProperty(String key) {
232:                    mailProperties.remove(key);
233:                }
234:
235:                public Properties getProperties() {
236:                    return mailProperties;
237:                }
238:
239:                public String getPassword() {
240:                    return password;
241:                }
242:
243:                public void setPassword(String password) {
244:                    this.password = password;
245:                }
246:
247:            }
248:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.