Source Code Cross Referenced for HTTPProxyData.java in  » Net » Ganymed-SSH-2 » ch » ethz » ssh2 » 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 » Net » Ganymed SSH 2 » ch.ethz.ssh2 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        package ch.ethz.ssh2;
02:
03:        /**
04:         * A <code>HTTPProxyData</code> object is used to specify the needed connection data
05:         * to connect through a HTTP proxy. 
06:         * 
07:         * @see Connection#setProxyData(ProxyData)
08:         * 
09:         * @author Christian Plattner, plattner@inf.ethz.ch
10:         * @version $Id: HTTPProxyData.java,v 1.2 2006/08/02 12:05:00 cplattne Exp $
11:         */
12:
13:        public class HTTPProxyData implements  ProxyData {
14:            public final String proxyHost;
15:            public final int proxyPort;
16:            public final String proxyUser;
17:            public final String proxyPass;
18:            public final String[] requestHeaderLines;
19:
20:            /**
21:             * Same as calling {@link #HTTPProxyData(String, int, String, String) HTTPProxyData(proxyHost, proxyPort, <code>null</code>, <code>null</code>)}
22:             * 
23:             * @param proxyHost Proxy hostname.
24:             * @param proxyPort Proxy port.
25:             */
26:            public HTTPProxyData(String proxyHost, int proxyPort) {
27:                this (proxyHost, proxyPort, null, null);
28:            }
29:
30:            /**
31:             * Same as calling {@link #HTTPProxyData(String, int, String, String, String[]) HTTPProxyData(proxyHost, proxyPort, <code>null</code>, <code>null</code>, <code>null</code>)}
32:             *
33:             * @param proxyHost Proxy hostname.
34:             * @param proxyPort Proxy port.
35:             * @param proxyUser Username for basic authentication (<code>null</code> if no authentication is needed).
36:             * @param proxyPass Password for basic authentication (<code>null</code> if no authentication is needed).
37:             */
38:            public HTTPProxyData(String proxyHost, int proxyPort,
39:                    String proxyUser, String proxyPass) {
40:                this (proxyHost, proxyPort, proxyUser, proxyPass, null);
41:            }
42:
43:            /**
44:             * Connection data for a HTTP proxy. It is possible to specify a username and password
45:             * if the proxy requires basic authentication. Also, additional request header lines can
46:             * be specified (e.g., "User-Agent: CERN-LineMode/2.15 libwww/2.17b3").
47:             * <p>
48:             * Please note: if you want to use basic authentication, then both <code>proxyUser</code>
49:             * and <code>proxyPass</code> must be non-null.
50:             * <p>
51:             * Here is an example:
52:             * <p>
53:             * <code>
54:             * new HTTPProxyData("192.168.1.1", "3128", "proxyuser", "secret", new String[] {"User-Agent: GanymedBasedClient/1.0", "X-My-Proxy-Option: something"});
55:             * </code>
56:             * 
57:             * @param proxyHost Proxy hostname.
58:             * @param proxyPort Proxy port.
59:             * @param proxyUser Username for basic authentication (<code>null</code> if no authentication is needed).
60:             * @param proxyPass Password for basic authentication (<code>null</code> if no authentication is needed).
61:             * @param requestHeaderLines An array with additional request header lines (without end-of-line markers)
62:             *        that have to be sent to the server. May be <code>null</code>.
63:             */
64:
65:            public HTTPProxyData(String proxyHost, int proxyPort,
66:                    String proxyUser, String proxyPass,
67:                    String[] requestHeaderLines) {
68:                if (proxyHost == null)
69:                    throw new IllegalArgumentException(
70:                            "proxyHost must be non-null");
71:
72:                if (proxyPort < 0)
73:                    throw new IllegalArgumentException(
74:                            "proxyPort must be non-negative");
75:
76:                this.proxyHost = proxyHost;
77:                this.proxyPort = proxyPort;
78:                this.proxyUser = proxyUser;
79:                this.proxyPass = proxyPass;
80:                this.requestHeaderLines = requestHeaderLines;
81:            }
82:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.