~testplan-team/testplan/source-collection

« back to all changes in this revision

Viewing changes to commons-httpclient-3.1/docs/apidocs/org/apache/commons/httpclient/protocol/ReflectionSocketFactory.html

  • Committer: edA-qa mort-ora-y
  • Date: 2009-01-28 15:36:51 UTC
  • Revision ID: eda-qa@disemia.com-20090128153651-u4uzd035zyjea16j
adding httpclient

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
2
<!--NewPage-->
 
3
<HTML>
 
4
<HEAD>
 
5
<!-- Generated by javadoc (build 1.5.0_11) on Sat Aug 18 11:01:02 CEST 2007 -->
 
6
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 
7
<TITLE>
 
8
ReflectionSocketFactory (HttpClient 3.1 API)
 
9
</TITLE>
 
10
 
 
11
<META NAME="keywords" CONTENT="org.apache.commons.httpclient.protocol.ReflectionSocketFactory class">
 
12
 
 
13
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
 
14
 
 
15
<SCRIPT type="text/javascript">
 
16
function windowTitle()
 
17
{
 
18
    parent.document.title="ReflectionSocketFactory (HttpClient 3.1 API)";
 
19
}
 
20
</SCRIPT>
 
21
<NOSCRIPT>
 
22
</NOSCRIPT>
 
23
 
 
24
</HEAD>
 
25
 
 
26
<BODY BGCOLOR="white" onload="windowTitle();">
 
27
 
 
28
 
 
29
<!-- ========= START OF TOP NAVBAR ======= -->
 
30
<A NAME="navbar_top"><!-- --></A>
 
31
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 
32
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 
33
<TR>
 
34
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 
35
<A NAME="navbar_top_firstrow"><!-- --></A>
 
36
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 
37
  <TR ALIGN="center" VALIGN="top">
 
38
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 
39
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 
40
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ReflectionSocketFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 
42
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 
46
  </TR>
 
47
</TABLE>
 
48
</TD>
 
49
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 
50
</EM>
 
51
</TD>
 
52
</TR>
 
53
 
 
54
<TR>
 
55
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
56
&nbsp;<A HREF="../../../../../org/apache/commons/httpclient/protocol/ProtocolSocketFactory.html" title="interface in org.apache.commons.httpclient.protocol"><B>PREV CLASS</B></A>&nbsp;
 
57
&nbsp;<A HREF="../../../../../org/apache/commons/httpclient/protocol/SecureProtocolSocketFactory.html" title="interface in org.apache.commons.httpclient.protocol"><B>NEXT CLASS</B></A></FONT></TD>
 
58
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
59
  <A HREF="../../../../../index.html?org/apache/commons/httpclient/protocol/ReflectionSocketFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 
60
&nbsp;<A HREF="ReflectionSocketFactory.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 
61
&nbsp;<SCRIPT type="text/javascript">
 
62
  <!--
 
63
  if(window==top) {
 
64
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 
65
  }
 
66
  //-->
 
67
</SCRIPT>
 
68
<NOSCRIPT>
 
69
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
 
70
</NOSCRIPT>
 
71
 
 
72
 
 
73
</FONT></TD>
 
74
</TR>
 
75
<TR>
 
76
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
77
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 
78
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
79
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 
80
</TR>
 
81
</TABLE>
 
82
<A NAME="skip-navbar_top"></A>
 
83
<!-- ========= END OF TOP NAVBAR ========= -->
 
84
 
 
85
<HR>
 
86
<!-- ======== START OF CLASS DATA ======== -->
 
87
<H2>
 
88
<FONT SIZE="-1">
 
89
org.apache.commons.httpclient.protocol</FONT>
 
90
<BR>
 
91
Class ReflectionSocketFactory</H2>
 
92
<PRE>
 
93
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
 
94
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.httpclient.protocol.ReflectionSocketFactory</B>
 
95
</PRE>
 
96
<HR>
 
97
<DL>
 
98
<DT><PRE>public final class <B>ReflectionSocketFactory</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
 
99
</PRE>
 
100
 
 
101
<P>
 
102
This helper class uses refelction in order to execute Socket methods
 
103
 available in Java 1.4 and above
 
104
<P>
 
105
 
 
106
<P>
 
107
<DL>
 
108
<DT><B>Since:</B></DT>
 
109
  <DD>3.0</DD>
 
110
<DT><B>Author:</B></DT>
 
111
  <DD>Oleg Kalnichevski</DD>
 
112
</DL>
 
113
<HR>
 
114
 
 
115
<P>
 
116
 
 
117
<!-- ========== METHOD SUMMARY =========== -->
 
118
 
 
119
<A NAME="method_summary"><!-- --></A>
 
120
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
121
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 
122
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
 
123
<B>Method Summary</B></FONT></TH>
 
124
</TR>
 
125
<TR BGCOLOR="white" CLASS="TableRowColor">
 
126
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
127
<CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html" title="class or interface in java.net">Socket</A></CODE></FONT></TD>
 
128
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/protocol/ReflectionSocketFactory.html#createSocket(java.lang.String, java.lang.String, int, java.net.InetAddress, int, int)">createSocket</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;socketfactoryName,
 
129
             <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;host,
 
130
             int&nbsp;port,
 
131
             <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html" title="class or interface in java.net">InetAddress</A>&nbsp;localAddress,
 
132
             int&nbsp;localPort,
 
133
             int&nbsp;timeout)</CODE>
 
134
 
 
135
<BR>
 
136
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method attempts to execute Socket method available since Java 1.4
 
137
 using reflection.</TD>
 
138
</TR>
 
139
</TABLE>
 
140
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
 
141
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
142
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
 
143
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
 
144
</TR>
 
145
<TR BGCOLOR="white" CLASS="TableRowColor">
 
146
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
 
147
</TR>
 
148
</TABLE>
 
149
&nbsp;
 
150
<P>
 
151
 
 
152
<!-- ============ METHOD DETAIL ========== -->
 
153
 
 
154
<A NAME="method_detail"><!-- --></A>
 
155
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
156
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 
157
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
 
158
<B>Method Detail</B></FONT></TH>
 
159
</TR>
 
160
</TABLE>
 
161
 
 
162
<A NAME="createSocket(java.lang.String, java.lang.String, int, java.net.InetAddress, int, int)"><!-- --></A><H3>
 
163
createSocket</H3>
 
164
<PRE>
 
165
public static <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html" title="class or interface in java.net">Socket</A> <B>createSocket</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;socketfactoryName,
 
166
                                  <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;host,
 
167
                                  int&nbsp;port,
 
168
                                  <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html" title="class or interface in java.net">InetAddress</A>&nbsp;localAddress,
 
169
                                  int&nbsp;localPort,
 
170
                                  int&nbsp;timeout)
 
171
                           throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
 
172
                                  <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/UnknownHostException.html" title="class or interface in java.net">UnknownHostException</A>,
 
173
                                  <A HREF="../../../../../org/apache/commons/httpclient/ConnectTimeoutException.html" title="class in org.apache.commons.httpclient">ConnectTimeoutException</A></PRE>
 
174
<DL>
 
175
<DD>This method attempts to execute Socket method available since Java 1.4
 
176
 using reflection. If the methods are not available or could not be executed
 
177
 <tt>null</tt> is returned
 
178
<P>
 
179
<DD><DL>
 
180
<DT><B>Parameters:</B><DD><CODE>socketfactoryName</CODE> - name of the socket factory class<DD><CODE>host</CODE> - the host name/IP<DD><CODE>port</CODE> - the port on the host<DD><CODE>localAddress</CODE> - the local host name/IP to bind the socket to<DD><CODE>localPort</CODE> - the port on the local machine<DD><CODE>timeout</CODE> - the timeout value to be used in milliseconds. If the socket cannot be
 
181
        completed within the given time limit, it will be abandoned
 
182
<DT><B>Returns:</B><DD>a connected Socket
 
183
<DT><B>Throws:</B>
 
184
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O error occurs while creating the socket
 
185
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/UnknownHostException.html" title="class or interface in java.net">UnknownHostException</A></CODE> - if the IP address of the host cannot be
 
186
 determined
 
187
<DD><CODE><A HREF="../../../../../org/apache/commons/httpclient/ConnectTimeoutException.html" title="class in org.apache.commons.httpclient">ConnectTimeoutException</A></CODE> - if socket cannot be connected within the
 
188
  given time limit</DL>
 
189
</DD>
 
190
</DL>
 
191
<!-- ========= END OF CLASS DATA ========= -->
 
192
<HR>
 
193
 
 
194
 
 
195
<!-- ======= START OF BOTTOM NAVBAR ====== -->
 
196
<A NAME="navbar_bottom"><!-- --></A>
 
197
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
 
198
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 
199
<TR>
 
200
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 
201
<A NAME="navbar_bottom_firstrow"><!-- --></A>
 
202
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 
203
  <TR ALIGN="center" VALIGN="top">
 
204
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 
205
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 
206
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 
207
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ReflectionSocketFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 
208
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 
209
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 
210
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 
211
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 
212
  </TR>
 
213
</TABLE>
 
214
</TD>
 
215
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 
216
</EM>
 
217
</TD>
 
218
</TR>
 
219
 
 
220
<TR>
 
221
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
222
&nbsp;<A HREF="../../../../../org/apache/commons/httpclient/protocol/ProtocolSocketFactory.html" title="interface in org.apache.commons.httpclient.protocol"><B>PREV CLASS</B></A>&nbsp;
 
223
&nbsp;<A HREF="../../../../../org/apache/commons/httpclient/protocol/SecureProtocolSocketFactory.html" title="interface in org.apache.commons.httpclient.protocol"><B>NEXT CLASS</B></A></FONT></TD>
 
224
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
225
  <A HREF="../../../../../index.html?org/apache/commons/httpclient/protocol/ReflectionSocketFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 
226
&nbsp;<A HREF="ReflectionSocketFactory.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 
227
&nbsp;<SCRIPT type="text/javascript">
 
228
  <!--
 
229
  if(window==top) {
 
230
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 
231
  }
 
232
  //-->
 
233
</SCRIPT>
 
234
<NOSCRIPT>
 
235
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
 
236
</NOSCRIPT>
 
237
 
 
238
 
 
239
</FONT></TD>
 
240
</TR>
 
241
<TR>
 
242
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
243
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 
244
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
245
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 
246
</TR>
 
247
</TABLE>
 
248
<A NAME="skip-navbar_bottom"></A>
 
249
<!-- ======== END OF BOTTOM NAVBAR ======= -->
 
250
 
 
251
<HR>
 
252
Copyright &copy; 2001-2007 Apache Software Foundation. All Rights Reserved.
 
253
</BODY>
 
254
</HTML>