commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http folder.gif file.gif SessionImpl.html Session.html ResponseImpl.html Response.html RequestImpl.html RequestHeadersImpl.html RequestHeaders.html Request.html ParametersImpl.html Parameters.html index.html CredentialsImpl.html
Date Mon, 01 Apr 2002 05:41:00 GMT
dion        02/03/31 21:41:00

  Added:       docs/latka/xref/java/org/apache/commons/latka/http
                        folder.gif file.gif SessionImpl.html Session.html
                        ResponseImpl.html Response.html RequestImpl.html
                        RequestHeadersImpl.html RequestHeaders.html
                        Request.html ParametersImpl.html Parameters.html
                        index.html CredentialsImpl.html
  Log:
  New Maven generated site
  
  Revision  Changes    Path
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/folder.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/file.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/SessionImpl.html
  
  Index: SessionImpl.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/SessionImpl.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.net.URL;
  <a name="63" href="#63">63</a>  <b>import</b> java.util.LinkedList;
  <a name="64" href="#64">64</a>  
  <a name="65" href="#65">65</a>  <b>import</b> org.apache.commons.httpclient.HttpState;
  <a name="66" href="#66">66</a>  <b>import</b> org.apache.commons.httpclient.Cookie;
  <a name="67" href="#67">67</a>  
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> * An implementation of a Latka Session interface based on the Jakarta Commons HttpClient package.</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i> *</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:dsale@us.britannica.com" target="alexandria_uri">mailto:dsale@us.britannica.com</a>"&gt;Doug Sale&lt;/a&gt;</font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:mdelagra@us.britannica.com" target="alexandria_uri">mailto:mdelagra@us.britannica.com</a>"&gt;Morgan Delagrange&lt;/a&gt;</font></i>
  <a name="73" href="#73">73</a>  <font color="#AA0000"><i> * @author dIon Gillard</font></i>
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i> * @version $Id: SessionImpl.html,v 1.1 2002/04/01 05:40:59 dion Exp $</font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i> */</font></i>
  <a name="76" href="#76">76</a>  <b>public</b> <b>class</b> <a href="../../../../../org/apache/commons/latka/http/SessionImpl.html">SessionImpl</a> implements <a href="../../../../../org/apache/commons/latka/http/Session.html">Session</a> {
  <a name="77" href="#77">77</a>  
  <a name="78" href="#78">78</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>* </font></i></font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i>   * tracks URLs treated by this session</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i>   * Session will automatically set the referer</font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i>   * header for a request to the URL of the</font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i>   * previous request</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="84" href="#84">84</a>    <b>protected</b> LinkedList _urls = <b>new</b> LinkedList();
  <a name="85" href="#85">85</a>  
  <a name="86" href="#86">86</a>    <font color="#329900"><i>// this state object 'belongs' to HttpClient</font></i>
  <a name="87" href="#87">87</a>    <font color="#329900"><i>// we maintain a reference in SessionImpl for</font></i>
  <a name="88" href="#88">88</a>    <font color="#329900"><i>// simplicity</font></i>
  <a name="89" href="#89">89</a>    <b>protected</b> HttpState      _state = <b>new</b> HttpState();
  <a name="90" href="#90">90</a>  
  <a name="91" href="#91">91</a>    <font color="#329900"><i>///////////////////////////////</font></i>
  <a name="92" href="#92">92</a>    <font color="#329900"><i>// Session Interface Methods //</font></i>
  <a name="93" href="#93">93</a>    <font color="#329900"><i>///////////////////////////////</font></i>
  <a name="94" href="#94">94</a>  
  <a name="95" href="#95">95</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="96" href="#96">96</a>  <font color="#AA0000"><i>   * Creates a request object with the specified URL and HTTP Method.</font></i>
  <a name="97" href="#97">97</a>  <font color="#AA0000"><i>   * </font></i>
  <a name="98" href="#98">98</a>  <font color="#AA0000"><i>   * @param url        The URL to request of the HTTP server.</font></i>
  <a name="99" href="#99">99</a>  <font color="#AA0000"><i>   * @param httpMethod An integer representing the HTTP method (e.g. GET, PUT) used to communicate with server.</font></i>
  <a name="100" href="#100">100</a> <font color="#AA0000"><i>   * @return a new &lt;code&gt;Request&lt;/code&gt; object representing the &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;httpMethod&lt;/code&gt;</font></i>
  <a name="101" href="#101">101</a> <font color="#AA0000"><i>   * @see org.apache.commons.latka.http.Request#HTTP_METHOD_GET</font></i>
  <a name="102" href="#102">102</a> <font color="#AA0000"><i>   * @see org.apache.commons.latka.http.Request#HTTP_METHOD_POST</font></i>
  <a name="103" href="#103">103</a> <font color="#AA0000"><i>   */</font></i>
  <a name="104" href="#104">104</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Request.html">Request</a> createRequest(URL url, <b>int</b> httpMethod) {
  <a name="105" href="#105">105</a>      <b>return</b> createRequest(<b>null</b>,url,httpMethod,<b>true</b>);
  <a name="106" href="#106">106</a>   }
  <a name="107" href="#107">107</a> 
  <a name="108" href="#108">108</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="109" href="#109">109</a> <font color="#AA0000"><i>   * Creates a request object with the specified URL and HTTP Method.  Note:</font></i>
  <a name="110" href="#110">110</a> <font color="#AA0000"><i>   * in the current implementation, old request objects will not </font></i>
  <a name="111" href="#111">111</a> <font color="#AA0000"><i>   * </font></i>
  <a name="112" href="#112">112</a> <font color="#AA0000"><i>   * @param label  Name of the request</font></i>
  <a name="113" href="#113">113</a> <font color="#AA0000"><i>   * @param url        The URL to request of the HTTP server.</font></i>
  <a name="114" href="#114">114</a> <font color="#AA0000"><i>   * @param httpMethod An integer representing the HTTP method (e.g. GET, PUT) used to communicate with server.</font></i>
  <a name="115" href="#115">115</a> <font color="#AA0000"><i>   * @return a new &lt;code&gt;Request&lt;/code&gt; object representing the &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;httpMethod&lt;/code&gt;</font></i>
  <a name="116" href="#116">116</a> <font color="#AA0000"><i>   * @see org.apache.commons.latka.http.Request#HTTP_METHOD_GET</font></i>
  <a name="117" href="#117">117</a> <font color="#AA0000"><i>   * @see org.apache.commons.latka.http.Request#HTTP_METHOD_POST</font></i>
  <a name="118" href="#118">118</a> <font color="#AA0000"><i>   */</font></i>
  <a name="119" href="#119">119</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Request.html">Request</a> createRequest(String label, URL url, 
  <a name="120" href="#120">120</a>                                <b>int</b> httpMethod, <b>boolean</b> followRedirects) {
  <a name="121" href="#121">121</a> 
  <a name="122" href="#122">122</a>     <a href="../../../../../org/apache/commons/latka/http/RequestImpl.html">RequestImpl</a> request = 
  <a name="123" href="#123">123</a>       <b>new</b> <a href="../../../../../org/apache/commons/latka/http/RequestImpl.html">RequestImpl</a>(label,url, httpMethod, _state, <b>this</b>, followRedirects);
  <a name="124" href="#124">124</a> 
  <a name="125" href="#125">125</a>     URL referer = getReferer();
  <a name="126" href="#126">126</a> 
  <a name="127" href="#127">127</a>     <b>if</b> (referer != <b>null</b>) {
  <a name="128" href="#128">128</a>       request.addHeader(<font color="#000099">"Referer"</font>, referer.toString());
  <a name="129" href="#129">129</a>     }
  <a name="130" href="#130">130</a> 
  <a name="131" href="#131">131</a>     <b>return</b> request;
  <a name="132" href="#132">132</a>   }
  <a name="133" href="#133">133</a> 
  <a name="134" href="#134">134</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="135" href="#135">135</a> <font color="#AA0000"><i>   * Called inside the request.execute() method, setting the</font></i>
  <a name="136" href="#136">136</a> <font color="#AA0000"><i>   * referer for the next request.</font></i>
  <a name="137" href="#137">137</a> <font color="#AA0000"><i>   * </font></i>
  <a name="138" href="#138">138</a> <font color="#AA0000"><i>   * @param url    URL of the last executed request.</font></i>
  <a name="139" href="#139">139</a> <font color="#AA0000"><i>   */</font></i>
  <a name="140" href="#140">140</a>   <b>protected</b> <b>void</b> setReferer(URL url) {
  <a name="141" href="#141">141</a>     _urls.add(url);
  <a name="142" href="#142">142</a>   }
  <a name="143" href="#143">143</a> 
  <a name="144" href="#144">144</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="145" href="#145">145</a> <font color="#AA0000"><i>   * The URL of the last request that was executed.  This</font></i>
  <a name="146" href="#146">146</a> <font color="#AA0000"><i>   * will be the _actual_ url accessed in the result of </font></i>
  <a name="147" href="#147">147</a> <font color="#AA0000"><i>   * a 301 or 302 redirect (the page that returned</font></i>
  <a name="148" href="#148">148</a> <font color="#AA0000"><i>   * a 200 status code).</font></i>
  <a name="149" href="#149">149</a> <font color="#AA0000"><i>   * </font></i>
  <a name="150" href="#150">150</a> <font color="#AA0000"><i>   * @return Referer of the last request, or null if there have</font></i>
  <a name="151" href="#151">151</a> <font color="#AA0000"><i>   *         been no successful requests.</font></i>
  <a name="152" href="#152">152</a> <font color="#AA0000"><i>   */</font></i>
  <a name="153" href="#153">153</a>   <b>protected</b> URL getReferer() {
  <a name="154" href="#154">154</a>     <b>if</b> (_urls.size() &gt; 0) {
  <a name="155" href="#155">155</a>       <b>return</b> (URL)_urls.getLast();
  <a name="156" href="#156">156</a>     }
  <a name="157" href="#157">157</a> 
  <a name="158" href="#158">158</a>     <b>return</b> <b>null</b>;
  <a name="159" href="#159">159</a>   }
  <a name="160" href="#160">160</a> 
  <a name="161" href="#161">161</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="162" href="#162">162</a> <font color="#AA0000"><i>   * Adds a cookie to all HTTP requests whose domain and path match (according to RFC2109).</font></i>
  <a name="163" href="#163">163</a> <font color="#AA0000"><i>   *</font></i>
  <a name="164" href="#164">164</a> <font color="#AA0000"><i>   * @param domain  the domain to which the cookie should apply</font></i>
  <a name="165" href="#165">165</a> <font color="#AA0000"><i>   * @param path    the path to which the cookie should apply</font></i>
  <a name="166" href="#166">166</a> <font color="#AA0000"><i>   * @param name    the name of the cookie</font></i>
  <a name="167" href="#167">167</a> <font color="#AA0000"><i>   * @param value   the value of the cookie</font></i>
  <a name="168" href="#168">168</a> <font color="#AA0000"><i>   */</font></i>
  <a name="169" href="#169">169</a>   <b>public</b> <b>void</b> addCookie(String domain, String path,
  <a name="170" href="#170">170</a>                         String name, String value) {
  <a name="171" href="#171">171</a> 
  <a name="172" href="#172">172</a>     Cookie cookie = <b>new</b> Cookie(domain, name, value);
  <a name="173" href="#173">173</a>     cookie.setPath(path);
  <a name="174" href="#174">174</a> 
  <a name="175" href="#175">175</a>     _state.addCookie(cookie);
  <a name="176" href="#176">176</a>   }
  <a name="177" href="#177">177</a> 
  <a name="178" href="#178">178</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="179" href="#179">179</a> <font color="#AA0000"><i>   * Returns the value of cookie &lt;code&gt;name&lt;/code&gt;.</font></i>
  <a name="180" href="#180">180</a> <font color="#AA0000"><i>   *</font></i>
  <a name="181" href="#181">181</a> <font color="#AA0000"><i>   * @param name  the name of the cookie</font></i>
  <a name="182" href="#182">182</a> <font color="#AA0000"><i>   *</font></i>
  <a name="183" href="#183">183</a> <font color="#AA0000"><i>   * @return the value of the cookie, or null if the cookie isn't set</font></i>
  <a name="184" href="#184">184</a> <font color="#AA0000"><i>   */</font></i>
  <a name="185" href="#185">185</a>   <b>public</b> String getCookieValue(String name) {
  <a name="186" href="#186">186</a>     String  value = <b>null</b>;
  <a name="187" href="#187">187</a>     <b>boolean</b> done  = false;
  <a name="188" href="#188">188</a> 
  <a name="189" href="#189">189</a>     Cookie[] cookies = _state.getCookies();
  <a name="190" href="#190">190</a> 
  <a name="191" href="#191">191</a>     <b>for</b> (<b>int</b> i = 0; i &lt; cookies.length && !done; i++) {
  <a name="192" href="#192">192</a>       <b>if</b> (cookies[i].getName().equals(name)) {
  <a name="193" href="#193">193</a>         value = cookies[i].getValue();
  <a name="194" href="#194">194</a>         done = <b>true</b>;
  <a name="195" href="#195">195</a>       }
  <a name="196" href="#196">196</a>     }
  <a name="197" href="#197">197</a> 
  <a name="198" href="#198">198</a>     <b>return</b> value;
  <a name="199" href="#199">199</a>   }
  <a name="200" href="#200">200</a> 
  <a name="201" href="#201">201</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/Session.html
  
  Index: Session.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/Session.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.net.URL;
  <a name="63" href="#63">63</a>  
  <a name="64" href="#64">64</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="65" href="#65">65</a>  <font color="#AA0000"><i> * A Latka Session is a container that manages state information</font></i>
  <a name="66" href="#66">66</a>  <font color="#AA0000"><i> * over 1+ HTTP request/response pairs over 1+ HTTP servers.</font></i>
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i> *</font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:dsale@us.britannica.com" target="alexandria_uri">mailto:dsale@us.britannica.com</a>"&gt;Doug Sale&lt;/a&gt;</font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:mdelagra@us.britannica.com" target="alexandria_uri">mailto:mdelagra@us.britannica.com</a>"&gt;Morgan Delagrange&lt;/a&gt;</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i> * @author dIon Gillard</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i> * @version $Id: Session.html,v 1.1 2002/04/01 05:40:59 dion Exp $</font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i> */</font></i>
  <a name="73" href="#73">73</a>  <b>public</b> <b>interface</b> <a href="../../../../../org/apache/commons/latka/http/Session.html">Session</a> {
  <a name="74" href="#74">74</a>  
  <a name="75" href="#75">75</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="76" href="#76">76</a>  <font color="#AA0000"><i>   * Creates a request object with the specified URL and HTTP Method.</font></i>
  <a name="77" href="#77">77</a>  <font color="#AA0000"><i>   * </font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i>   * @param url        The URL to request of the HTTP server.</font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i>   * @param httpMethod An integer representing the HTTP method (e.g. GET, PUT) used to communicate with server.</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i>   * @return a new &lt;code&gt;Request&lt;/code&gt; object representing the &lt;code&gt;url&lt;/code&gt; and &lt;code&gt;httpMethod&lt;/code&gt;</font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i>   * @see org.apache.commons.latka.http.Request#HTTP_METHOD_GET</font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i>   * @see org.apache.commons.latka.http.Request#HTTP_METHOD_POST</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="84" href="#84">84</a>    <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Request.html">Request</a> createRequest(URL url, <b>int</b> httpMethod);
  <a name="85" href="#85">85</a>    <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Request.html">Request</a> createRequest(String label, URL url, <b>int</b> httpMethod,<b>boolean</b> followRedirects);
  <a name="86" href="#86">86</a>  
  <a name="87" href="#87">87</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="88" href="#88">88</a>  <font color="#AA0000"><i>   * Adds a cookie to all HTTP requests whose domain and path match (according to RFC2109).</font></i>
  <a name="89" href="#89">89</a>  <font color="#AA0000"><i>   *</font></i>
  <a name="90" href="#90">90</a>  <font color="#AA0000"><i>   * @param domain  the domain to which the cookie should apply</font></i>
  <a name="91" href="#91">91</a>  <font color="#AA0000"><i>   * @param path    the path to which the cookie should apply</font></i>
  <a name="92" href="#92">92</a>  <font color="#AA0000"><i>   * @param name    the name of the cookie</font></i>
  <a name="93" href="#93">93</a>  <font color="#AA0000"><i>   * @param value   the value of the cookie</font></i>
  <a name="94" href="#94">94</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="95" href="#95">95</a>    <b>public</b> <b>void</b> addCookie(String domain, String path,
  <a name="96" href="#96">96</a>                          String name, String value);
  <a name="97" href="#97">97</a>  
  <a name="98" href="#98">98</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="99" href="#99">99</a>  <font color="#AA0000"><i>   * Returns the value of cookie &lt;code&gt;name&lt;/code&gt;.</font></i>
  <a name="100" href="#100">100</a> <font color="#AA0000"><i>   *</font></i>
  <a name="101" href="#101">101</a> <font color="#AA0000"><i>   * @param name  the name of the cookie</font></i>
  <a name="102" href="#102">102</a> <font color="#AA0000"><i>   *</font></i>
  <a name="103" href="#103">103</a> <font color="#AA0000"><i>   * @return the value of the cookie, or null if the cookie isn't set</font></i>
  <a name="104" href="#104">104</a> <font color="#AA0000"><i>   */</font></i>
  <a name="105" href="#105">105</a>   <b>public</b> String getCookieValue(String name);
  <a name="106" href="#106">106</a> 
  <a name="107" href="#107">107</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/ResponseImpl.html
  
  Index: ResponseImpl.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/ResponseImpl.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.io.InputStream;
  <a name="63" href="#63">63</a>  <b>import</b> java.io.IOException;
  <a name="64" href="#64">64</a>  
  <a name="65" href="#65">65</a>  <b>import</b> org.apache.commons.httpclient.Header;
  <a name="66" href="#66">66</a>  <b>import</b> org.apache.commons.httpclient.HttpMethod;
  <a name="67" href="#67">67</a>  
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> * An implementation of a Latka Response interface based on the Jakarta Commons HttpClient package.</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i> *</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:dsale@us.britannica.com" target="alexandria_uri">mailto:dsale@us.britannica.com</a>"&gt;Doug Sale&lt;/a&gt;</font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:mdelagra@us.britannica.com" target="alexandria_uri">mailto:mdelagra@us.britannica.com</a>"&gt;Morgan Delagrange&lt;/a&gt;</font></i>
  <a name="73" href="#73">73</a>  <font color="#AA0000"><i> * @author dIon Gillard</font></i>
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i> * @version $Id: ResponseImpl.html,v 1.1 2002/04/01 05:40:59 dion Exp $</font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i> */</font></i>
  <a name="76" href="#76">76</a>  <b>public</b> <b>class</b> <a href="../../../../../org/apache/commons/latka/http/ResponseImpl.html">ResponseImpl</a> implements <a href="../../../../../org/apache/commons/latka/http/Response.html">Response</a> {
  <a name="77" href="#77">77</a>  
  <a name="78" href="#78">78</a>    <b>protected</b> <a href="../../../../../org/apache/commons/latka/http/RequestImpl.html">RequestImpl</a> _request;
  <a name="79" href="#79">79</a>    <b>protected</b> HttpMethod  _httpMethod;
  <a name="80" href="#80">80</a>  
  <a name="81" href="#81">81</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i>   * Create a Response</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i>   *</font></i>
  <a name="84" href="#84">84</a>  <font color="#AA0000"><i>   * @param request  the request that motivated this response</font></i>
  <a name="85" href="#85">85</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="86" href="#86">86</a>    <a href="../../../../../org/apache/commons/latka/http/ResponseImpl.html">ResponseImpl</a>(<a href="../../../../../org/apache/commons/latka/http/RequestImpl.html">RequestImpl</a> request) {
  <a name="87" href="#87">87</a>      _request = request;
  <a name="88" href="#88">88</a>      _httpMethod = request.getHttpMethod();
  <a name="89" href="#89">89</a>    }
  <a name="90" href="#90">90</a>  
  <a name="91" href="#91">91</a>    <font color="#329900"><i>// defined in interface</font></i>
  <a name="92" href="#92">92</a>    <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Request.html">Request</a> getRequest() {
  <a name="93" href="#93">93</a>      <b>return</b> _request;
  <a name="94" href="#94">94</a>    }
  <a name="95" href="#95">95</a>  
  <a name="96" href="#96">96</a>    <font color="#329900"><i>////////////////////////////////</font></i>
  <a name="97" href="#97">97</a>    <font color="#329900"><i>// Response Interface Methods //</font></i>
  <a name="98" href="#98">98</a>    <font color="#329900"><i>////////////////////////////////</font></i>
  <a name="99" href="#99">99</a>  
  <a name="100" href="#100">100</a> 
  <a name="101" href="#101">101</a>   <font color="#329900"><i>// defined in interface</font></i>
  <a name="102" href="#102">102</a>   <b>public</b> <b>int</b> getStatusCode() {
  <a name="103" href="#103">103</a>     <b>return</b> _httpMethod.getStatusCode();
  <a name="104" href="#104">104</a>   }
  <a name="105" href="#105">105</a> 
  <a name="106" href="#106">106</a>   <font color="#329900"><i>// defined in interface</font></i>
  <a name="107" href="#107">107</a>   <b>public</b> String getResource() {
  <a name="108" href="#108">108</a>     <b>return</b> _httpMethod.getResponseBodyAsString();
  <a name="109" href="#109">109</a>   }
  <a name="110" href="#110">110</a> 
  <a name="111" href="#111">111</a>   <font color="#329900"><i>// defined in interface</font></i>
  <a name="112" href="#112">112</a>   <b>public</b> String getHeader(String headerName) {
  <a name="113" href="#113">113</a>     Header header = _httpMethod.getResponseHeader(headerName);
  <a name="114" href="#114">114</a>     <b>if</b> (header != <b>null</b>) {
  <a name="115" href="#115">115</a>       <b>return</b> header.getValue();
  <a name="116" href="#116">116</a>     }
  <a name="117" href="#117">117</a>     <b>return</b> <b>null</b>;
  <a name="118" href="#118">118</a>   }
  <a name="119" href="#119">119</a> 
  <a name="120" href="#120">120</a>   <font color="#329900"><i>// defined in interface</font></i>
  <a name="121" href="#121">121</a>   <b>public</b> <b>int</b> getByteLength() {
  <a name="122" href="#122">122</a>     <b>return</b> _httpMethod.getResponseBody().length;
  <a name="123" href="#123">123</a>   }
  <a name="124" href="#124">124</a> 
  <a name="125" href="#125">125</a>   <font color="#329900"><i>// defined in interface</font></i>
  <a name="126" href="#126">126</a>   <b>public</b> InputStream getStream() {
  <a name="127" href="#127">127</a>     InputStream stream;
  <a name="128" href="#128">128</a> 
  <a name="129" href="#129">129</a>     <b>try</b> {
  <a name="130" href="#130">130</a>       stream = _httpMethod.getResponseBodyAsStream();
  <a name="131" href="#131">131</a>     }
  <a name="132" href="#132">132</a>     <b>catch</b> (IOException ioX) {
  <a name="133" href="#133">133</a>       stream = <b>null</b>;
  <a name="134" href="#134">134</a>     }
  <a name="135" href="#135">135</a> 
  <a name="136" href="#136">136</a>     <b>return</b> stream;
  <a name="137" href="#137">137</a>   }
  <a name="138" href="#138">138</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/Response.html
  
  Index: Response.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/Response.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.io.InputStream;
  <a name="63" href="#63">63</a>  
  <a name="64" href="#64">64</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="65" href="#65">65</a>  <font color="#AA0000"><i> * A Latka Response represents a response from an HTTP server.</font></i>
  <a name="66" href="#66">66</a>  <font color="#AA0000"><i> *</font></i>
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:dsale@us.britannica.com" target="alexandria_uri">mailto:dsale@us.britannica.com</a>"&gt;Doug Sale&lt;/a&gt;</font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:mdelagra@us.britannica.com" target="alexandria_uri">mailto:mdelagra@us.britannica.com</a>"&gt;Morgan Delagrange&lt;/a&gt;</font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> */</font></i>
  <a name="70" href="#70">70</a>  <b>public</b> <b>interface</b> <a href="../../../../../org/apache/commons/latka/http/Response.html">Response</a> {
  <a name="71" href="#71">71</a>  
  <a name="72" href="#72">72</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="73" href="#73">73</a>  <font color="#AA0000"><i>   * @return the integer status code provided by the HTTP server.</font></i>
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="75" href="#75">75</a>    <b>public</b> <b>int</b> getStatusCode();
  <a name="76" href="#76">76</a>  
  <a name="77" href="#77">77</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i>   * @return the resource, in string form, provided by the HTTP server.</font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="80" href="#80">80</a>    <b>public</b> String getResource();
  <a name="81" href="#81">81</a>  
  <a name="82" href="#82">82</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i>   * Get the actual bytes returned by the web server</font></i>
  <a name="84" href="#84">84</a>  <font color="#AA0000"><i>   * </font></i>
  <a name="85" href="#85">85</a>  <font color="#AA0000"><i>   * @return InputStream containing the HTTP response</font></i>
  <a name="86" href="#86">86</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="87" href="#87">87</a>    <b>public</b> InputStream getStream();
  <a name="88" href="#88">88</a>  
  <a name="89" href="#89">89</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="90" href="#90">90</a>  <font color="#AA0000"><i>   * Returns the length of the Response stream (as bytes),</font></i>
  <a name="91" href="#91">91</a>  <font color="#AA0000"><i>   * or -1 if no stream is available</font></i>
  <a name="92" href="#92">92</a>  <font color="#AA0000"><i>   * </font></i>
  <a name="93" href="#93">93</a>  <font color="#AA0000"><i>   * @return Byte length of the response stream</font></i>
  <a name="94" href="#94">94</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="95" href="#95">95</a>    <b>public</b> <b>int</b> getByteLength();
  <a name="96" href="#96">96</a>  
  <a name="97" href="#97">97</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="98" href="#98">98</a>  <font color="#AA0000"><i>   * The request that generated this response</font></i>
  <a name="99" href="#99">99</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="100" href="#100">100</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Request.html">Request</a> getRequest();
  <a name="101" href="#101">101</a> 
  <a name="102" href="#102">102</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="103" href="#103">103</a> <font color="#AA0000"><i>   * Check a response header.</font></i>
  <a name="104" href="#104">104</a> <font color="#AA0000"><i>   * </font></i>
  <a name="105" href="#105">105</a> <font color="#AA0000"><i>   * @param headerName The name of the header to find in the Reponse</font></i>
  <a name="106" href="#106">106</a> <font color="#AA0000"><i>   * @return the value of the header, or null if the header does not </font></i>
  <a name="107" href="#107">107</a> <font color="#AA0000"><i>   *         exist</font></i>
  <a name="108" href="#108">108</a> <font color="#AA0000"><i>   */</font></i>
  <a name="109" href="#109">109</a>   <b>public</b> String getHeader(String headerName);
  <a name="110" href="#110">110</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/RequestImpl.html
  
  Index: RequestImpl.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/RequestImpl.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="61" href="#61">61</a>  <font color="#329900"><i>// java imports</font></i>
  <a name="62" href="#62">62</a>  <b>import</b> java.net.URL;
  <a name="63" href="#63">63</a>  <b>import</b> java.io.IOException;
  <a name="64" href="#64">64</a>  <b>import</b> java.util.Date;
  <a name="65" href="#65">65</a>  <b>import</b> java.util.List;
  <a name="66" href="#66">66</a>  <font color="#329900"><i>// latka imports</font></i>
  <a name="67" href="#67">67</a>  <b>import</b> org.apache.commons.httpclient.UsernamePasswordCredentials;
  <a name="68" href="#68">68</a>  <b>import</b> org.apache.commons.httpclient.HttpClient;
  <a name="69" href="#69">69</a>  <b>import</b> org.apache.commons.httpclient.HttpException;
  <a name="70" href="#70">70</a>  <b>import</b> org.apache.commons.httpclient.HttpMethod;
  <a name="71" href="#71">71</a>  <b>import</b> org.apache.commons.httpclient.HttpState;
  <a name="72" href="#72">72</a>  <b>import</b> org.apache.commons.httpclient.methods.GetMethod;
  <a name="73" href="#73">73</a>  <b>import</b> org.apache.commons.httpclient.methods.HeadMethod;
  <a name="74" href="#74">74</a>  <b>import</b> org.apache.commons.httpclient.methods.PostMethod;
  <a name="75" href="#75">75</a>  <font color="#329900"><i>// log4j imports</font></i>
  <a name="76" href="#76">76</a>  <b>import</b> org.apache.log4j.Category;
  <a name="77" href="#77">77</a>  
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i> * An implementation of a Latka Request interface based on the Jakarta Commons HttpClient package.</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i> *</font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:dsale@us.britannica.com" target="alexandria_uri">mailto:dsale@us.britannica.com</a>"&gt;Doug Sale&lt;/a&gt;</font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:mdelagra@us.britannica.com" target="alexandria_uri">mailto:mdelagra@us.britannica.com</a>"&gt;Morgan Delagrange&lt;/a&gt;</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i> * @author dIon Gillard</font></i>
  <a name="84" href="#84">84</a>  <font color="#AA0000"><i> * @version $Id: RequestImpl.html,v 1.1 2002/04/01 05:40:59 dion Exp $</font></i>
  <a name="85" href="#85">85</a>  <font color="#AA0000"><i> */</font></i>
  <a name="86" href="#86">86</a>  <b>public</b> <b>class</b> <a href="../../../../../org/apache/commons/latka/http/RequestImpl.html">RequestImpl</a> implements <a href="../../../../../org/apache/commons/latka/http/Request.html">Request</a> {
  <a name="87" href="#87">87</a>    
  <a name="88" href="#88">88</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>* Standard HTTP Port */</font></i></font></i>
  <a name="89" href="#89">89</a>    <b>public</b> <b>static</b> <b>final</b> <b>int</b> HTTP_PORT = 80;
  <a name="90" href="#90">90</a>  
  <a name="91" href="#91">91</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>* Standard HTTPS Port */</font></i></font></i>
  <a name="92" href="#92">92</a>    <b>public</b> <b>static</b> <b>final</b> <b>int</b> HTTPS_PORT = 443;
  <a name="93" href="#93">93</a>  
  <a name="94" href="#94">94</a>    <b>protected</b> String  _host   = <b>null</b>;
  <a name="95" href="#95">95</a>    <b>protected</b> <b>int</b>     _port   = -1;
  <a name="96" href="#96">96</a>    <b>protected</b> <b>int</b>     _method = -1;
  <a name="97" href="#97">97</a>  
  <a name="98" href="#98">98</a>    <b>protected</b> <a href="../../../../../org/apache/commons/latka/http/SessionImpl.html">SessionImpl</a> _session    = <b>null</b>;
  <a name="99" href="#99">99</a>    <b>protected</b> HttpMethod  _httpMethod = <b>null</b>;
  <a name="100" href="#100">100</a>   <b>protected</b> URL         _targetURL  = <b>null</b>;
  <a name="101" href="#101">101</a>   <b>protected</b> String      _query      = <b>null</b>;
  <a name="102" href="#102">102</a>   <b>protected</b> <b>long</b>        _requestTiming = -1;
  <a name="103" href="#103">103</a>   <b>protected</b> String      _label      = <b>null</b>;
  <a name="104" href="#104">104</a> 
  <a name="105" href="#105">105</a>   <b>protected</b> <a href="../../../../../org/apache/commons/latka/http/RequestHeaders.html">RequestHeaders</a> _requestHeaders = <b>new</b> <a href="../../../../../org/apache/commons/latka/http/RequestHeadersImpl.html">RequestHeadersImpl</a>();
  <a name="106" href="#106">106</a>   <b>protected</b> <a href="../../../../../org/apache/commons/latka/http/Parameters.html">Parameters</a> _parameters = <b>new</b> <a href="../../../../../org/apache/commons/latka/http/ParametersImpl.html">ParametersImpl</a>();
  <a name="107" href="#107">107</a>   <b>protected</b> <b>boolean</b> _followRedirects = <b>true</b>;
  <a name="108" href="#108">108</a> 
  <a name="109" href="#109">109</a>   <b>protected</b> HttpClient _httpClient = <b>new</b> HttpClient();
  <a name="110" href="#110">110</a> 
  <a name="111" href="#111">111</a>   <b>protected</b> <b>static</b> <b>final</b> Category _log = Category.getInstance(RequestImpl.<b>class</b>);
  <a name="112" href="#112">112</a> 
  <a name="113" href="#113">113</a>   <b>protected</b> <a href="../../../../../org/apache/commons/latka/http/RequestImpl.html">RequestImpl</a>(URL url,<b>int</b> httpMethod, HttpState state, 
  <a name="114" href="#114">114</a>                         <a href="../../../../../org/apache/commons/latka/http/SessionImpl.html">SessionImpl</a> session) {
  <a name="115" href="#115">115</a>     <b>this</b>(<b>null</b>,url,httpMethod,state,session,<b>true</b>);
  <a name="116" href="#116">116</a>   }
  <a name="117" href="#117">117</a> 
  <a name="118" href="#118">118</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="119" href="#119">119</a> <font color="#AA0000"><i>   * Create a RequestImpl</font></i>
  <a name="120" href="#120">120</a> <font color="#AA0000"><i>   *</font></i>
  <a name="121" href="#121">121</a> <font color="#AA0000"><i>   * @param url         the url that this request embodies</font></i>
  <a name="122" href="#122">122</a> <font color="#AA0000"><i>   * @param httpMethod  the method by which this request should be executed</font></i>
  <a name="123" href="#123">123</a> <font color="#AA0000"><i>   * @param session     the session that the request should be executed in</font></i>
  <a name="124" href="#124">124</a> <font color="#AA0000"><i>   */</font></i>
  <a name="125" href="#125">125</a>   <b>protected</b> <a href="../../../../../org/apache/commons/latka/http/RequestImpl.html">RequestImpl</a>(String label, URL url, <b>int</b> httpMethod, HttpState state, 
  <a name="126" href="#126">126</a>                         <a href="../../../../../org/apache/commons/latka/http/SessionImpl.html">SessionImpl</a> session, <b>boolean</b> followRedirects) {
  <a name="127" href="#127">127</a>     _followRedirects = followRedirects;
  <a name="128" href="#128">128</a>     _method = httpMethod;
  <a name="129" href="#129">129</a>     _httpClient.setState(state);
  <a name="130" href="#130">130</a>     
  <a name="131" href="#131">131</a>     _label = label;
  <a name="132" href="#132">132</a>     _query = url.getQuery();
  <a name="133" href="#133">133</a> 
  <a name="134" href="#134">134</a>     _session = session;
  <a name="135" href="#135">135</a>     _targetURL = url;
  <a name="136" href="#136">136</a> 
  <a name="137" href="#137">137</a>     <b>switch</b> (httpMethod) {
  <a name="138" href="#138">138</a>       <b>case</b> HTTP_METHOD_GET:
  <a name="139" href="#139">139</a>         _httpMethod = <b>new</b> GetMethod(url.getPath());
  <a name="140" href="#140">140</a>         ((GetMethod) _httpMethod).setUseDisk(false);
  <a name="141" href="#141">141</a>         <b>break</b>;
  <a name="142" href="#142">142</a>       <b>case</b> HTTP_METHOD_POST:
  <a name="143" href="#143">143</a>         _httpMethod = <b>new</b> PostMethod(url.getPath());
  <a name="144" href="#144">144</a>         ((PostMethod) _httpMethod).setUseDisk(false);
  <a name="145" href="#145">145</a>         <b>break</b>;
  <a name="146" href="#146">146</a>       <b>case</b> HTTP_METHOD_HEAD:
  <a name="147" href="#147">147</a>         _httpMethod = <b>new</b> HeadMethod(url.getPath());
  <a name="148" href="#148">148</a>         <b>break</b>;
  <a name="149" href="#149">149</a>       <b>default</b>:
  <a name="150" href="#150">150</a>         <b>throw</b> <b>new</b> IllegalArgumentException(<font color="#000099">"Unsupported HTTP Method"</font>);
  <a name="151" href="#151">151</a>     }
  <a name="152" href="#152">152</a> 
  <a name="153" href="#153">153</a> 
  <a name="154" href="#154">154</a>     <b>if</b> (_query != <b>null</b>) {
  <a name="155" href="#155">155</a>       _httpMethod.setQueryString(_query);
  <a name="156" href="#156">156</a>     }
  <a name="157" href="#157">157</a>     _httpMethod.setFollowRedirects(followRedirects);
  <a name="158" href="#158">158</a>   }
  <a name="159" href="#159">159</a> 
  <a name="160" href="#160">160</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="161" href="#161">161</a> <font color="#AA0000"><i>   * Returns a constant representing the http method</font></i>
  <a name="162" href="#162">162</a> <font color="#AA0000"><i>   * (get, post, etc.) being used by this request.  See</font></i>
  <a name="163" href="#163">163</a> <font color="#AA0000"><i>   * the Request interface for available constants.</font></i>
  <a name="164" href="#164">164</a> <font color="#AA0000"><i>   * </font></i>
  <a name="165" href="#165">165</a> <font color="#AA0000"><i>   * @return the underlying HttpMethod object representing the request/respose pair.</font></i>
  <a name="166" href="#166">166</a> <font color="#AA0000"><i>   */</font></i>
  <a name="167" href="#167">167</a>   <b>protected</b> HttpMethod getHttpMethod() {
  <a name="168" href="#168">168</a>     <b>return</b> _httpMethod;
  <a name="169" href="#169">169</a>   }
  <a name="170" href="#170">170</a> 
  <a name="171" href="#171">171</a>   <font color="#329900"><i>// defined in interface</font></i>
  <a name="172" href="#172">172</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/RequestHeaders.html">RequestHeaders</a> getHeaders() {
  <a name="173" href="#173">173</a>     <b>return</b> _requestHeaders;
  <a name="174" href="#174">174</a>   }
  <a name="175" href="#175">175</a> 
  <a name="176" href="#176">176</a>   <font color="#329900"><i>// defined in interface</font></i>
  <a name="177" href="#177">177</a>   <b>public</b> <b>void</b> setHeaders(<a href="../../../../../org/apache/commons/latka/http/RequestHeaders.html">RequestHeaders</a> requestHeaders) {
  <a name="178" href="#178">178</a>     _requestHeaders = requestHeaders;
  <a name="179" href="#179">179</a>   }
  <a name="180" href="#180">180</a> 
  <a name="181" href="#181">181</a>   <font color="#329900"><i>// defined in the interface</font></i>
  <a name="182" href="#182">182</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Parameters.html">Parameters</a> getParameters() {
  <a name="183" href="#183">183</a>     <b>return</b> _parameters;
  <a name="184" href="#184">184</a>   }
  <a name="185" href="#185">185</a> 
  <a name="186" href="#186">186</a>   <b>public</b> <b>void</b> setParameters(<a href="../../../../../org/apache/commons/latka/http/Parameters.html">Parameters</a> parameters) {
  <a name="187" href="#187">187</a>     _parameters = parameters;
  <a name="188" href="#188">188</a>   }
  <a name="189" href="#189">189</a> 
  <a name="190" href="#190">190</a>   <font color="#329900"><i>///////////////////////////////</font></i>
  <a name="191" href="#191">191</a>   <font color="#329900"><i>// Request Interface Methods //</font></i>
  <a name="192" href="#192">192</a>   <font color="#329900"><i>///////////////////////////////</font></i>
  <a name="193" href="#193">193</a> 
  <a name="194" href="#194">194</a>   <font color="#329900"><i>// defined in the interface</font></i>
  <a name="195" href="#195">195</a>   <b>public</b> <b>void</b> setCredentials(<a href="../../../../../org/apache/commons/latka/http/Credentials.html">Credentials</a> credentials) {
  <a name="196" href="#196">196</a>     <font color="#329900"><i>// null implies that this credential is the default (vs. specifying a realm)</font></i>
  <a name="197" href="#197">197</a>     _session._state.setCredentials(<b>null</b>, <b>new</b> UsernamePasswordCredentials(credentials.getUserName(),credentials.getPassword()));
  <a name="198" href="#198">198</a>   }
  <a name="199" href="#199">199</a> 
  <a name="200" href="#200">200</a>   <font color="#329900"><i>// defined in the interface</font></i>
  <a name="201" href="#201">201</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Response.html">Response</a> execute() throws IOException {
  <a name="202" href="#202">202</a> 
  <a name="203" href="#203">203</a>     <font color="#329900"><i>// set the request headers in HTTPClient</font></i>
  <a name="204" href="#204">204</a>     List headers = _requestHeaders.getHeaders();
  <a name="205" href="#205">205</a>     <b>for</b> (<b>int</b> i = 0; i &lt; headers.size(); ++i) {
  <a name="206" href="#206">206</a>       String[] header = (String[]) headers.get(i);
  <a name="207" href="#207">207</a>       _httpMethod.addRequestHeader(header[0],header[1]);
  <a name="208" href="#208">208</a>     }
  <a name="209" href="#209">209</a> 
  <a name="210" href="#210">210</a>     List parameters = _parameters.getParameters();
  <a name="211" href="#211">211</a>     <b>for</b> (<b>int</b> i = 0; i &lt; parameters.size(); ++i) {
  <a name="212" href="#212">212</a>       String[] parameter = (String[]) parameters.get(i);
  <a name="213" href="#213">213</a>       addHttpClientParameter(parameter[0],parameter[1]);
  <a name="214" href="#214">214</a>     }
  <a name="215" href="#215">215</a> 
  <a name="216" href="#216">216</a>     <font color="#329900"><i>// for timing</font></i>
  <a name="217" href="#217">217</a>     Date startDate = <b>new</b> Date();
  <a name="218" href="#218">218</a> 
  <a name="219" href="#219">219</a>     <a href="../../../../../org/apache/commons/latka/http/Response.html">Response</a> response = <b>null</b>;
  <a name="220" href="#220">220</a>     <b>try</b> {
  <a name="221" href="#221">221</a>       <font color="#329900"><i>// open the connection</font></i>
  <a name="222" href="#222">222</a>       openConnection();
  <a name="223" href="#223">223</a> 
  <a name="224" href="#224">224</a>       _log.debug(<font color="#000099">"executing request"</font>);
  <a name="225" href="#225">225</a> 
  <a name="226" href="#226">226</a>       _httpClient.executeMethod(_httpMethod);
  <a name="227" href="#227">227</a>       
  <a name="228" href="#228">228</a>       _log.debug(<font color="#000099">"request executed"</font>);
  <a name="229" href="#229">229</a>       
  <a name="230" href="#230">230</a>       response = <b>new</b> <a href="../../../../../org/apache/commons/latka/http/ResponseImpl.html">ResponseImpl</a>(<b>this</b>);
  <a name="231" href="#231">231</a> 
  <a name="232" href="#232">232</a>       <font color="#329900"><i>// set the referer</font></i>
  <a name="233" href="#233">233</a>       <font color="#329900"><i>// note: If followRedirects</font></i>
  <a name="234" href="#234">234</a>       <font color="#329900"><i>// is enabled, HTTPClient may return a path</font></i>
  <a name="235" href="#235">235</a>       <font color="#329900"><i>// that is different from the initial request.</font></i>
  <a name="236" href="#236">236</a>       <font color="#329900"><i>// HTTPClient will not follow redirects to another</font></i>
  <a name="237" href="#237">237</a>       <font color="#329900"><i>// host or port; in that event, it will always</font></i>
  <a name="238" href="#238">238</a>       <font color="#329900"><i>// return a 301 or 302.</font></i>
  <a name="239" href="#239">239</a>       _session.setReferer(<b>new</b> URL(_targetURL.getProtocol(),_host,_port,_httpMethod.getPath()));
  <a name="240" href="#240">240</a> 
  <a name="241" href="#241">241</a>     } <b>catch</b> (IOException e) {
  <a name="242" href="#242">242</a>       <font color="#329900"><i>// rethrow it after closing the connection</font></i>
  <a name="243" href="#243">243</a>       <b>throw</b> e;
  <a name="244" href="#244">244</a>     } <b>catch</b> (HttpException e) {
  <a name="245" href="#245">245</a>       <b>throw</b> <b>new</b> IOException(e.toString());
  <a name="246" href="#246">246</a>     } <b>finally</b> {
  <a name="247" href="#247">247</a>       <b>try</b> { closeConnection(); } <b>catch</b> (Exception e) { e.printStackTrace(); }
  <a name="248" href="#248">248</a>     }
  <a name="249" href="#249">249</a> 
  <a name="250" href="#250">250</a> 
  <a name="251" href="#251">251</a>     _requestTiming = ((<b>new</b> java.util.Date()).getTime() - startDate.getTime());
  <a name="252" href="#252">252</a> 
  <a name="253" href="#253">253</a>     <b>if</b> (_log.isInfoEnabled()) {
  <a name="254" href="#254">254</a>       _log.info(<font color="#000099">"response obtained (response logging disabled because some responses are binary)"</font>);
  <a name="255" href="#255">255</a>     }
  <a name="256" href="#256">256</a> 
  <a name="257" href="#257">257</a>     <b>return</b> response;
  <a name="258" href="#258">258</a>   }
  <a name="259" href="#259">259</a> 
  <a name="260" href="#260">260</a>   <font color="#329900"><i>// defined in the interface</font></i>
  <a name="261" href="#261">261</a>   <b>public</b> URL getURL() {
  <a name="262" href="#262">262</a>     <b>return</b> _targetURL;
  <a name="263" href="#263">263</a>   }
  <a name="264" href="#264">264</a> 
  <a name="265" href="#265">265</a>   <font color="#329900"><i>// defined in the interface</font></i>
  <a name="266" href="#266">266</a>   <b>public</b> String getLabel() {
  <a name="267" href="#267">267</a>     <b>return</b> _label;
  <a name="268" href="#268">268</a>   }
  <a name="269" href="#269">269</a> 
  <a name="270" href="#270">270</a>   <font color="#329900"><i>// defined in the interface</font></i>
  <a name="271" href="#271">271</a>   <b>public</b> <b>void</b> addParameter(String name, String value) {
  <a name="272" href="#272">272</a>     _parameters.addParameter(name,value);
  <a name="273" href="#273">273</a>   }
  <a name="274" href="#274">274</a> 
  <a name="275" href="#275">275</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="276" href="#276">276</a> <font color="#AA0000"><i>   * Associate a parameter with this request.</font></i>
  <a name="277" href="#277">277</a> <font color="#AA0000"><i>   *</font></i>
  <a name="278" href="#278">278</a> <font color="#AA0000"><i>   * @param name  the lvalue of the parameter</font></i>
  <a name="279" href="#279">279</a> <font color="#AA0000"><i>   * @param name  the rvalue of the parameter</font></i>
  <a name="280" href="#280">280</a> <font color="#AA0000"><i>   *</font></i>
  <a name="281" href="#281">281</a> <font color="#AA0000"><i>   * @throws java.lang.IllegalArgumentException  if a parameter is null</font></i>
  <a name="282" href="#282">282</a> <font color="#AA0000"><i>   */</font></i>
  <a name="283" href="#283">283</a>   <b>protected</b> <b>void</b> addHttpClientParameter(String name, String value) {
  <a name="284" href="#284">284</a> 
  <a name="285" href="#285">285</a>     _log.info(<font color="#000099">"adding parameter, name:"</font>);
  <a name="286" href="#286">286</a>     _log.info(name);
  <a name="287" href="#287">287</a>     _log.info(<font color="#000099">"value:"</font>);
  <a name="288" href="#288">288</a>     _log.info(value);
  <a name="289" href="#289">289</a> 
  <a name="290" href="#290">290</a>     <b>try</b> {
  <a name="291" href="#291">291</a>       <b>if</b> (_httpMethod instanceof PostMethod) {
  <a name="292" href="#292">292</a>         <font color="#329900"><i>// addParameter adds to POST Entity, not URL</font></i>
  <a name="293" href="#293">293</a>         ((PostMethod) _httpMethod).addParameter(name, value);
  <a name="294" href="#294">294</a>       } <b>else</b> {
  <a name="295" href="#295">295</a>         StringBuffer query = <b>new</b> StringBuffer();
  <a name="296" href="#296">296</a> 
  <a name="297" href="#297">297</a>         <font color="#329900"><i>// setParameter adds to URL as query string</font></i>
  <a name="298" href="#298">298</a>         <b>if</b> (_query == <b>null</b> || _query.equals(<font color="#000099">""</font>)) {
  <a name="299" href="#299">299</a>           query.append(name);
  <a name="300" href="#300">300</a>           query.append(<font color="#000099">"="</font>);
  <a name="301" href="#301">301</a>           query.append(value);
  <a name="302" href="#302">302</a>         }
  <a name="303" href="#303">303</a>         <b>else</b> {
  <a name="304" href="#304">304</a>           query.append(_query);
  <a name="305" href="#305">305</a>           query.append(<font color="#000099">"&"</font>);
  <a name="306" href="#306">306</a>           query.append(name);
  <a name="307" href="#307">307</a>           query.append(<font color="#000099">"="</font>);
  <a name="308" href="#308">308</a>           query.append(value);
  <a name="309" href="#309">309</a>         }
  <a name="310" href="#310">310</a>         _query = query.toString();
  <a name="311" href="#311">311</a>         ((HttpMethod) _httpMethod).setQueryString(_query);
  <a name="312" href="#312">312</a>       }
  <a name="313" href="#313">313</a>     } <b>catch</b> (NullPointerException nullX) {
  <a name="314" href="#314">314</a>       <b>throw</b> <b>new</b> IllegalArgumentException(nullX.toString());
  <a name="315" href="#315">315</a>     }
  <a name="316" href="#316">316</a>   }
  <a name="317" href="#317">317</a> 
  <a name="318" href="#318">318</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="319" href="#319">319</a> <font color="#AA0000"><i>   * Set a header in the request</font></i>
  <a name="320" href="#320">320</a> <font color="#AA0000"><i>   * </font></i>
  <a name="321" href="#321">321</a> <font color="#AA0000"><i>   * @param headerName name of any HTTP request header</font></i>
  <a name="322" href="#322">322</a> <font color="#AA0000"><i>   * @param headerValue value of that header</font></i>
  <a name="323" href="#323">323</a> <font color="#AA0000"><i>   */</font></i>
  <a name="324" href="#324">324</a>   <b>public</b> <b>void</b> addHeader(String headerName, String headerValue) {
  <a name="325" href="#325">325</a>     _requestHeaders.addHeader(headerName,headerValue);
  <a name="326" href="#326">326</a>   }
  <a name="327" href="#327">327</a> 
  <a name="328" href="#328">328</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="329" href="#329">329</a> <font color="#AA0000"><i>   * Retrieve the session associated with this request.</font></i>
  <a name="330" href="#330">330</a> <font color="#AA0000"><i>   *</font></i>
  <a name="331" href="#331">331</a> <font color="#AA0000"><i>   * @return a &lt;code&gt;Session&lt;/code&gt; object</font></i>
  <a name="332" href="#332">332</a> <font color="#AA0000"><i>   */</font></i>
  <a name="333" href="#333">333</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Session.html">Session</a> getSession() {
  <a name="334" href="#334">334</a>     <b>return</b> _session;
  <a name="335" href="#335">335</a>   }
  <a name="336" href="#336">336</a> 
  <a name="337" href="#337">337</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="338" href="#338">338</a> <font color="#AA0000"><i>   * @return the amount of time it took to execute this request (in milliseconds),</font></i>
  <a name="339" href="#339">339</a> <font color="#AA0000"><i>   * or -1 if the request has not yet been executed</font></i>
  <a name="340" href="#340">340</a> <font color="#AA0000"><i>   */</font></i>
  <a name="341" href="#341">341</a>   <b>public</b> <b>int</b> getRequestTiming() {
  <a name="342" href="#342">342</a>     <b>return</b>(<b>int</b>) _requestTiming;
  <a name="343" href="#343">343</a>   }
  <a name="344" href="#344">344</a> 
  <a name="345" href="#345">345</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="346" href="#346">346</a> <font color="#AA0000"><i>   * opens an HTTP connection.  This method is called</font></i>
  <a name="347" href="#347">347</a> <font color="#AA0000"><i>   * before executing the method.</font></i>
  <a name="348" href="#348">348</a> <font color="#AA0000"><i>   * </font></i>
  <a name="349" href="#349">349</a> <font color="#AA0000"><i>   * @param request Request containing the HttpClient object that will</font></i>
  <a name="350" href="#350">350</a> <font color="#AA0000"><i>   *                open the connection</font></i>
  <a name="351" href="#351">351</a> <font color="#AA0000"><i>   * @exception IOException</font></i>
  <a name="352" href="#352">352</a> <font color="#AA0000"><i>   *                   if the server could not be contacted</font></i>
  <a name="353" href="#353">353</a> <font color="#AA0000"><i>   */</font></i>
  <a name="354" href="#354">354</a>   <b>protected</b> <b>void</b> openConnection() throws IOException {
  <a name="355" href="#355">355</a>     _log.debug(<font color="#000099">"Opening connection"</font>);
  <a name="356" href="#356">356</a> 
  <a name="357" href="#357">357</a>     URL url = getURL();
  <a name="358" href="#358">358</a>     String protocol = url.getProtocol();
  <a name="359" href="#359">359</a>     String host = url.getHost();
  <a name="360" href="#360">360</a>     <b>int</b> port = url.getPort();
  <a name="361" href="#361">361</a> 
  <a name="362" href="#362">362</a>     <font color="#329900"><i>// explicitly set port if not in url,</font></i>
  <a name="363" href="#363">363</a>     <font color="#329900"><i>// just for storing away and comparison</font></i>
  <a name="364" href="#364">364</a>     <b>if</b> (port == -1) {
  <a name="365" href="#365">365</a>       <b>if</b> (protocol.equals(<font color="#000099">"http"</font>)) {
  <a name="366" href="#366">366</a>         port = HTTP_PORT;
  <a name="367" href="#367">367</a>       }
  <a name="368" href="#368">368</a>       <b>else</b> <b>if</b> (protocol.equals(<font color="#000099">"https"</font>)) {
  <a name="369" href="#369">369</a>         port = HTTPS_PORT;
  <a name="370" href="#370">370</a>       }
  <a name="371" href="#371">371</a>       <b>else</b> {
  <a name="372" href="#372">372</a>         <b>throw</b> <b>new</b> IllegalArgumentException(<font color="#000099">"Unsupported Protocol"</font>);
  <a name="373" href="#373">373</a>       }
  <a name="374" href="#374">374</a>     }
  <a name="375" href="#375">375</a> 
  <a name="376" href="#376">376</a>     <font color="#329900"><i>// save session values</font></i>
  <a name="377" href="#377">377</a>     _host = host;
  <a name="378" href="#378">378</a>     _port = port;
  <a name="379" href="#379">379</a> 
  <a name="380" href="#380">380</a>     <font color="#329900"><i>// start session</font></i>
  <a name="381" href="#381">381</a>     _httpClient.startSession(url);
  <a name="382" href="#382">382</a> 
  <a name="383" href="#383">383</a>     _log.debug(<font color="#000099">"connection open"</font>);
  <a name="384" href="#384">384</a> 
  <a name="385" href="#385">385</a>   }
  <a name="386" href="#386">386</a> 
  <a name="387" href="#387">387</a>   <b>protected</b> <b>void</b> closeConnection() throws IOException {
  <a name="388" href="#388">388</a>     _log.debug(<font color="#000099">"closing connection"</font>);
  <a name="389" href="#389">389</a>     _httpClient.endSession();
  <a name="390" href="#390">390</a>     _log.debug(<font color="#000099">"connection closed"</font>);
  <a name="391" href="#391">391</a>   }
  <a name="392" href="#392">392</a> 
  <a name="393" href="#393">393</a>   <font color="#329900"><i>// defined in the interface</font></i>
  <a name="394" href="#394">394</a>   <b>public</b> <b>boolean</b> followRedirects() {
  <a name="395" href="#395">395</a>     <b>return</b> _followRedirects;
  <a name="396" href="#396">396</a>   }
  <a name="397" href="#397">397</a> 
  <a name="398" href="#398">398</a>   <font color="#329900"><i>// defined in interface</font></i>
  <a name="399" href="#399">399</a>   <b>public</b> <b>int</b> getMethod() {
  <a name="400" href="#400">400</a>     <b>return</b> _method;
  <a name="401" href="#401">401</a>   }
  <a name="402" href="#402">402</a> 
  <a name="403" href="#403">403</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/RequestHeadersImpl.html
  
  Index: RequestHeadersImpl.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/RequestHeadersImpl.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i> 
  <a name="59" href="#59">59</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="60" href="#60">60</a>  
  <a name="61" href="#61">61</a>  <b>import</b> java.util.LinkedList;
  <a name="62" href="#62">62</a>  <b>import</b> java.util.List;
  <a name="63" href="#63">63</a>  
  <a name="64" href="#64">64</a>  <b>public</b> <b>class</b> <a href="../../../../../org/apache/commons/latka/http/RequestHeadersImpl.html">RequestHeadersImpl</a> implements <a href="../../../../../org/apache/commons/latka/http/RequestHeaders.html">RequestHeaders</a> {
  <a name="65" href="#65">65</a>  
  <a name="66" href="#66">66</a>    <b>protected</b> List _list = <b>new</b> LinkedList();
  <a name="67" href="#67">67</a>  
  <a name="68" href="#68">68</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i>   * Protected access, headers can only be copied from </font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i>   * request to request.</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="72" href="#72">72</a>    <b>protected</b> <a href="../../../../../org/apache/commons/latka/http/RequestHeadersImpl.html">RequestHeadersImpl</a>() {
  <a name="73" href="#73">73</a>    }
  <a name="74" href="#74">74</a>  
  <a name="75" href="#75">75</a>    <font color="#329900"><i>// defined in interface</font></i>
  <a name="76" href="#76">76</a>    <b>public</b> <b>void</b> addHeader(String headerName, String headerValue) {
  <a name="77" href="#77">77</a>      _list.add(<b>new</b> String[] { headerName, headerValue });
  <a name="78" href="#78">78</a>    }
  <a name="79" href="#79">79</a>  
  <a name="80" href="#80">80</a>    <font color="#329900"><i>// defined in interface</font></i>
  <a name="81" href="#81">81</a>    <b>public</b> List getHeaders() {
  <a name="82" href="#82">82</a>      <b>return</b> _list;
  <a name="83" href="#83">83</a>    }
  <a name="84" href="#84">84</a>  
  <a name="85" href="#85">85</a>  }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/RequestHeaders.html
  
  Index: RequestHeaders.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/RequestHeaders.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i> 
  <a name="59" href="#59">59</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="60" href="#60">60</a>  
  <a name="61" href="#61">61</a>  <b>import</b> java.util.List;
  <a name="62" href="#62">62</a>  
  <a name="63" href="#63">63</a>  <b>public</b> <b>interface</b> <a href="../../../../../org/apache/commons/latka/http/RequestHeaders.html">RequestHeaders</a> {
  <a name="64" href="#64">64</a>  
  <a name="65" href="#65">65</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="66" href="#66">66</a>  <font color="#AA0000"><i>   * Add a header to the request</font></i>
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i>   * </font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i>   * @param headerName header name</font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i>   * @param headerValue</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i>   *                   header value, or null for an empty value</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="72" href="#72">72</a>    <b>public</b> <b>void</b> addHeader(String headerName, String headerValue);
  <a name="73" href="#73">73</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="74" href="#74">74</a>  <font color="#AA0000"><i>   * Returns a list of all the headers for the request.</font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i>   * Elements of the list are a String array with the</font></i>
  <a name="76" href="#76">76</a>  <font color="#AA0000"><i>   * headerName as the first value and the header value</font></i>
  <a name="77" href="#77">77</a>  <font color="#AA0000"><i>   * as the second (can be null).</font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i>   * </font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i>   * @return all headers for the request</font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="81" href="#81">81</a>    <b>public</b> List getHeaders();
  <a name="82" href="#82">82</a>  
  <a name="83" href="#83">83</a>  }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/Request.html
  
  Index: Request.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/Request.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i>   
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="61" href="#61">61</a>  
  <a name="62" href="#62">62</a>  <b>import</b> java.net.URL;
  <a name="63" href="#63">63</a>  <b>import</b> java.io.IOException;
  <a name="64" href="#64">64</a>  
  <a name="65" href="#65">65</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="66" href="#66">66</a>  <font color="#AA0000"><i> * A Latka Request represents a request from an HTTP server.</font></i>
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i> *</font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:dsale@us.britannica.com" target="alexandria_uri">mailto:dsale@us.britannica.com</a>"&gt;Doug Sale&lt;/a&gt;</font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i> * @author &lt;a href="<a href="mailto:mdelagra@us.britannica.com" target="alexandria_uri">mailto:mdelagra@us.britannica.com</a>"&gt;Morgan Delagrange&lt;/a&gt;</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i> * @author dIon Gillard</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i> */</font></i>
  <a name="72" href="#72">72</a>  <b>public</b> <b>interface</b> <a href="../../../../../org/apache/commons/latka/http/Request.html">Request</a> {
  <a name="73" href="#73">73</a>  
  <a name="74" href="#74">74</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>* An integer representing the HTTP GET method */</font></i></font></i>
  <a name="75" href="#75">75</a>    <b>public</b> <b>static</b> <b>final</b> <b>int</b> HTTP_METHOD_GET = 0;
  <a name="76" href="#76">76</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>* An integer representing the HTTP POST method */</font></i></font></i>
  <a name="77" href="#77">77</a>    <b>public</b> <b>static</b> <b>final</b> <b>int</b> HTTP_METHOD_POST = 1;
  <a name="78" href="#78">78</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>* An integer representing the HTTP POST method */</font></i></font></i>
  <a name="79" href="#79">79</a>    <b>public</b> <b>static</b> <b>final</b> <b>int</b> HTTP_METHOD_HEAD = 2;
  <a name="80" href="#80">80</a>    
  <a name="81" href="#81">81</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="82" href="#82">82</a>  <font color="#AA0000"><i>   * Execute this HTTP request.</font></i>
  <a name="83" href="#83">83</a>  <font color="#AA0000"><i>   *</font></i>
  <a name="84" href="#84">84</a>  <font color="#AA0000"><i>   * @return a Response object represnting the HTTP response to the request</font></i>
  <a name="85" href="#85">85</a>  <font color="#AA0000"><i>   *</font></i>
  <a name="86" href="#86">86</a>  <font color="#AA0000"><i>   * @throws IOException if the remote server could not be reached</font></i>
  <a name="87" href="#87">87</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="88" href="#88">88</a>    <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Response.html">Response</a> execute() throws IOException;
  <a name="89" href="#89">89</a>  
  <a name="90" href="#90">90</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="91" href="#91">91</a>  <font color="#AA0000"><i>   * Assigns a text label to this request.  This label</font></i>
  <a name="92" href="#92">92</a>  <font color="#AA0000"><i>   * will be made available to a LatkaEventListener</font></i>
  <a name="93" href="#93">93</a>  <font color="#AA0000"><i>   * during a test's execution</font></i>
  <a name="94" href="#94">94</a>  <font color="#AA0000"><i>   * </font></i>
  <a name="95" href="#95">95</a>  <font color="#AA0000"><i>   * @return the label associated with this request</font></i>
  <a name="96" href="#96">96</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="97" href="#97">97</a>    <b>public</b> String getLabel();
  <a name="98" href="#98">98</a>  
  <a name="99" href="#99">99</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="100" href="#100">100</a> <font color="#AA0000"><i>   * Gets the URL that Latka will attempt to contact.  Note:</font></i>
  <a name="101" href="#101">101</a> <font color="#AA0000"><i>   * since Latka will respect most redirects, this may not</font></i>
  <a name="102" href="#102">102</a> <font color="#AA0000"><i>   * be the URL that returns the actual response.</font></i>
  <a name="103" href="#103">103</a> <font color="#AA0000"><i>   * </font></i>
  <a name="104" href="#104">104</a> <font color="#AA0000"><i>   * @return the URL associated with this HTTP request</font></i>
  <a name="105" href="#105">105</a> <font color="#AA0000"><i>   */</font></i>
  <a name="106" href="#106">106</a>   <b>public</b> URL getURL();
  <a name="107" href="#107">107</a> 
  <a name="108" href="#108">108</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="109" href="#109">109</a> <font color="#AA0000"><i>   * Associate a parameter with this request.</font></i>
  <a name="110" href="#110">110</a> <font color="#AA0000"><i>   *</font></i>
  <a name="111" href="#111">111</a> <font color="#AA0000"><i>   * @param name  the name of the parameter</font></i>
  <a name="112" href="#112">112</a> <font color="#AA0000"><i>   * @param value the value of the parameter</font></i>
  <a name="113" href="#113">113</a> <font color="#AA0000"><i>   *</font></i>
  <a name="114" href="#114">114</a> <font color="#AA0000"><i>   */</font></i>
  <a name="115" href="#115">115</a>   <b>public</b> <b>void</b> addParameter(String name, String value);
  <a name="116" href="#116">116</a> 
  <a name="117" href="#117">117</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="118" href="#118">118</a> <font color="#AA0000"><i>   * Set all the parameters for the request.  Overrides</font></i>
  <a name="119" href="#119">119</a> <font color="#AA0000"><i>   * any parameters that have been already set by addParameter();</font></i>
  <a name="120" href="#120">120</a> <font color="#AA0000"><i>   * </font></i>
  <a name="121" href="#121">121</a> <font color="#AA0000"><i>   * @param parameters</font></i>
  <a name="122" href="#122">122</a> <font color="#AA0000"><i>   *               all parameters for this request</font></i>
  <a name="123" href="#123">123</a> <font color="#AA0000"><i>   */</font></i>
  <a name="124" href="#124">124</a>   <b>public</b> <b>void</b> setParameters(<a href="../../../../../org/apache/commons/latka/http/Parameters.html">Parameters</a> parameters);
  <a name="125" href="#125">125</a> 
  <a name="126" href="#126">126</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="127" href="#127">127</a> <font color="#AA0000"><i>   * Get the parameters for the request, so that they can</font></i>
  <a name="128" href="#128">128</a> <font color="#AA0000"><i>   * be copied to another request if necessary.</font></i>
  <a name="129" href="#129">129</a> <font color="#AA0000"><i>   * </font></i>
  <a name="130" href="#130">130</a> <font color="#AA0000"><i>   * @return parameters for this request</font></i>
  <a name="131" href="#131">131</a> <font color="#AA0000"><i>   */</font></i>
  <a name="132" href="#132">132</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Parameters.html">Parameters</a> getParameters();
  <a name="133" href="#133">133</a>   
  <a name="134" href="#134">134</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="135" href="#135">135</a> <font color="#AA0000"><i>   * Sets a request header.</font></i>
  <a name="136" href="#136">136</a> <font color="#AA0000"><i>   * </font></i>
  <a name="137" href="#137">137</a> <font color="#AA0000"><i>   * @param headerName header name</font></i>
  <a name="138" href="#138">138</a> <font color="#AA0000"><i>   * @param headerValue header value or null for a null header</font></i>
  <a name="139" href="#139">139</a> <font color="#AA0000"><i>   */</font></i>
  <a name="140" href="#140">140</a>   <b>public</b> <b>void</b> addHeader(String headerName, String headerValue);
  <a name="141" href="#141">141</a> 
  <a name="142" href="#142">142</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="143" href="#143">143</a> <font color="#AA0000"><i>   * Set all the headers for the request.  Overrides</font></i>
  <a name="144" href="#144">144</a> <font color="#AA0000"><i>   * any headers that have been already set by addHeader();</font></i>
  <a name="145" href="#145">145</a> <font color="#AA0000"><i>   * </font></i>
  <a name="146" href="#146">146</a> <font color="#AA0000"><i>   * @param requestHeaders</font></i>
  <a name="147" href="#147">147</a> <font color="#AA0000"><i>   *               all headers for this request</font></i>
  <a name="148" href="#148">148</a> <font color="#AA0000"><i>   */</font></i>
  <a name="149" href="#149">149</a>   <b>public</b> <b>void</b> setHeaders(<a href="../../../../../org/apache/commons/latka/http/RequestHeaders.html">RequestHeaders</a> requestHeaders);
  <a name="150" href="#150">150</a> 
  <a name="151" href="#151">151</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="152" href="#152">152</a> <font color="#AA0000"><i>   * Get the headers for the request, so that they can</font></i>
  <a name="153" href="#153">153</a> <font color="#AA0000"><i>   * be copied to another request if necessary.</font></i>
  <a name="154" href="#154">154</a> <font color="#AA0000"><i>   * </font></i>
  <a name="155" href="#155">155</a> <font color="#AA0000"><i>   * @return headers for this request</font></i>
  <a name="156" href="#156">156</a> <font color="#AA0000"><i>   */</font></i>
  <a name="157" href="#157">157</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/RequestHeaders.html">RequestHeaders</a> getHeaders();
  <a name="158" href="#158">158</a> 
  <a name="159" href="#159">159</a>   <font color="#329900"><i>// getHeader method purposely ommitted.  HttpClient does not retain</font></i>
  <a name="160" href="#160">160</a>   <font color="#329900"><i>// header information after the request is submitted.</font></i>
  <a name="161" href="#161">161</a> 
  <a name="162" href="#162">162</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="163" href="#163">163</a> <font color="#AA0000"><i>   * Retrieve the session associated with this request.</font></i>
  <a name="164" href="#164">164</a> <font color="#AA0000"><i>   *</font></i>
  <a name="165" href="#165">165</a> <font color="#AA0000"><i>   * @return a &lt;code&gt;Session&lt;/code&gt; object</font></i>
  <a name="166" href="#166">166</a> <font color="#AA0000"><i>   */</font></i>
  <a name="167" href="#167">167</a>   <b>public</b> <a href="../../../../../org/apache/commons/latka/http/Session.html">Session</a> getSession();
  <a name="168" href="#168">168</a> 
  <a name="169" href="#169">169</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="170" href="#170">170</a> <font color="#AA0000"><i>   * The amount of time it took to execute the</font></i>
  <a name="171" href="#171">171</a> <font color="#AA0000"><i>   * request in milliseconds, or -1 if the request has not</font></i>
  <a name="172" href="#172">172</a> <font color="#AA0000"><i>   * been executed successfully</font></i>
  <a name="173" href="#173">173</a> <font color="#AA0000"><i>   *</font></i>
  <a name="174" href="#174">174</a> <font color="#AA0000"><i>   * @return time it took to execute the request in millis</font></i>
  <a name="175" href="#175">175</a> <font color="#AA0000"><i>   */</font></i>
  <a name="176" href="#176">176</a>   <b>public</b> <b>int</b> getRequestTiming();
  <a name="177" href="#177">177</a> 
  <a name="178" href="#178">178</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="179" href="#179">179</a> <font color="#AA0000"><i>   * Sets the basic authentication credentials for this request,</font></i>
  <a name="180" href="#180">180</a> <font color="#AA0000"><i>   * if any.</font></i>
  <a name="181" href="#181">181</a> <font color="#AA0000"><i>   * </font></i>
  <a name="182" href="#182">182</a> <font color="#AA0000"><i>   * @param credentials user's identification</font></i>
  <a name="183" href="#183">183</a> <font color="#AA0000"><i>   */</font></i>
  <a name="184" href="#184">184</a>   <b>public</b> <b>void</b> setCredentials(<a href="../../../../../org/apache/commons/latka/http/Credentials.html">Credentials</a> credentials);
  <a name="185" href="#185">185</a> 
  <a name="186" href="#186">186</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="187" href="#187">187</a> <font color="#AA0000"><i>   * Whether or not this request will instruct HttpClient</font></i>
  <a name="188" href="#188">188</a> <font color="#AA0000"><i>   * to follow local redirects automatically.</font></i>
  <a name="189" href="#189">189</a> <font color="#AA0000"><i>   * </font></i>
  <a name="190" href="#190">190</a> <font color="#AA0000"><i>   * @return true if HttpClient will redirect a 301 or 302 response</font></i>
  <a name="191" href="#191">191</a> <font color="#AA0000"><i>   */</font></i>
  <a name="192" href="#192">192</a>   <b>public</b> <b>boolean</b> followRedirects();
  <a name="193" href="#193">193</a> 
  <a name="194" href="#194">194</a>   <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="195" href="#195">195</a> <font color="#AA0000"><i>   * Return the constant representing the HTTP method</font></i>
  <a name="196" href="#196">196</a> <font color="#AA0000"><i>   * to use in this request</font></i>
  <a name="197" href="#197">197</a> <font color="#AA0000"><i>   * </font></i>
  <a name="198" href="#198">198</a> <font color="#AA0000"><i>   * @return HTTP method for this request</font></i>
  <a name="199" href="#199">199</a> <font color="#AA0000"><i>   */</font></i>
  <a name="200" href="#200">200</a>   <b>public</b> <b>int</b> getMethod();
  <a name="201" href="#201">201</a> 
  <a name="202" href="#202">202</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/ParametersImpl.html
  
  Index: ParametersImpl.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/ParametersImpl.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i> 
  <a name="59" href="#59">59</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="60" href="#60">60</a>  
  <a name="61" href="#61">61</a>  <b>import</b> java.util.LinkedList;
  <a name="62" href="#62">62</a>  <b>import</b> java.util.List;
  <a name="63" href="#63">63</a>  
  <a name="64" href="#64">64</a>  <b>public</b> <b>class</b> <a href="../../../../../org/apache/commons/latka/http/ParametersImpl.html">ParametersImpl</a> implements <a href="../../../../../org/apache/commons/latka/http/Parameters.html">Parameters</a> {
  <a name="65" href="#65">65</a>  
  <a name="66" href="#66">66</a>    <b>protected</b> List _list = <b>new</b> LinkedList();
  <a name="67" href="#67">67</a>  
  <a name="68" href="#68">68</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i>   * Protected access, parameters can only be copied from </font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i>   * request to request.</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="72" href="#72">72</a>    <b>protected</b> <a href="../../../../../org/apache/commons/latka/http/ParametersImpl.html">ParametersImpl</a>() {
  <a name="73" href="#73">73</a>    }
  <a name="74" href="#74">74</a>  
  <a name="75" href="#75">75</a>    <font color="#329900"><i>// defined in the interface</font></i>
  <a name="76" href="#76">76</a>    <b>public</b> <b>void</b> addParameter(String paramName, String paramValue) {
  <a name="77" href="#77">77</a>      _list.add(<b>new</b> String[] { paramName, paramValue });
  <a name="78" href="#78">78</a>    }
  <a name="79" href="#79">79</a>  
  <a name="80" href="#80">80</a>    <font color="#329900"><i>// defined in the interface</font></i>
  <a name="81" href="#81">81</a>    <b>public</b> List getParameters() {
  <a name="82" href="#82">82</a>      <b>return</b> _list;
  <a name="83" href="#83">83</a>    }
  <a name="84" href="#84">84</a>  
  <a name="85" href="#85">85</a>  }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/Parameters.html
  
  Index: Parameters.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/Parameters.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i> 
  <a name="59" href="#59">59</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="60" href="#60">60</a>  
  <a name="61" href="#61">61</a>  <b>import</b> java.util.List;
  <a name="62" href="#62">62</a>  
  <a name="63" href="#63">63</a>  <b>public</b> <b>interface</b> <a href="../../../../../org/apache/commons/latka/http/Parameters.html">Parameters</a> {
  <a name="64" href="#64">64</a>    
  <a name="65" href="#65">65</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="66" href="#66">66</a>  <font color="#AA0000"><i>   * Add a parameter to the request</font></i>
  <a name="67" href="#67">67</a>  <font color="#AA0000"><i>   * </font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i>   * @param paramName parameter name</font></i>
  <a name="69" href="#69">69</a>  <font color="#AA0000"><i>   * @param paramValue</font></i>
  <a name="70" href="#70">70</a>  <font color="#AA0000"><i>   *                   parameter value, or null for an empty value</font></i>
  <a name="71" href="#71">71</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="72" href="#72">72</a>    <b>public</b> <b>void</b> addParameter(String paramName, String paramValue);
  <a name="73" href="#73">73</a>  
  <a name="74" href="#74">74</a>    <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="75" href="#75">75</a>  <font color="#AA0000"><i>   * Returns a list of all the parameters for the request.</font></i>
  <a name="76" href="#76">76</a>  <font color="#AA0000"><i>   * Elements of the list are a String array with the</font></i>
  <a name="77" href="#77">77</a>  <font color="#AA0000"><i>   * parameter name as the first value and the parameter value</font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i>   * as the second (can be null).</font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i>   * </font></i>
  <a name="80" href="#80">80</a>  <font color="#AA0000"><i>   * @return all parameters for the request</font></i>
  <a name="81" href="#81">81</a>  <font color="#AA0000"><i>   */</font></i>
  <a name="82" href="#82">82</a>    <b>public</b> List getParameters();
  <a name="83" href="#83">83</a>  
  <a name="84" href="#84">84</a>  }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/index.html
  
  Index: index.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <a href="../">[parent]</a>
  <hr>
  <table width="100%">
  <tr>
  <td><b>Name</b></td>
  <td><b>Size</b></td>
  <td><b>Last Modified</b></td>
  </tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="Credentials.html">Credentials.java</a></td><td valign="middle" NOWRAP>8936 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="CredentialsImpl.html">CredentialsImpl.java</a></td><td valign="middle" NOWRAP>10897 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="Parameters.html">Parameters.java</a></td><td valign="middle" NOWRAP>9475 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="ParametersImpl.html">ParametersImpl.java</a></td><td valign="middle" NOWRAP>9266 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="Request.html">Request.java</a></td><td valign="middle" NOWRAP>21465 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="RequestHeaders.html">RequestHeaders.java</a></td><td valign="middle" NOWRAP>9427 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="RequestHeadersImpl.html">RequestHeadersImpl.java</a></td><td valign="middle" NOWRAP>9281 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="RequestImpl.html">RequestImpl.java</a></td><td valign="middle" NOWRAP>35993 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="Response.html">Response.java</a></td><td valign="middle" NOWRAP>12046 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="ResponseImpl.html">ResponseImpl.java</a></td><td valign="middle" NOWRAP>13498 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="Session.html">Session.java</a></td><td valign="middle" NOWRAP>12485 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  <tr valign="middle"><td valign="middle" NOWRAP><img src="./file.gif" valign="middle" border="0">&nbsp;<a href="SessionImpl.html">SessionImpl.java</a></td><td valign="middle" NOWRAP>20417 (in bytes) </td><td valign="middle" NOWRAP>1/04/2002</td></tr>
  </table>
  <hr>
  <center>This page automatically generated by Maven</center>
  </body>
  </html>
  
  
  
  1.1                  jakarta-commons/docs/latka/xref/java/org/apache/commons/latka/http/CredentialsImpl.html
  
  Index: CredentialsImpl.html
  ===================================================================
  <html>
  <body bgcolor="white">
  <pre>
  <table bgcolor="#FFFFCC" cellpadding="0" cellspacing="0" border="0" width="100%"><a href="../../../../../../../apidocs/org/apache/commons/latka/http/CredentialsImpl.html">View Javadoc</a></table>
  <a name="1" href="#1">1</a>   <font color="#329900"><i>/*</font></i>
  <a name="2" href="#2">2</a>   <font color="#329900"><i> * ====================================================================</font></i>
  <a name="3" href="#3">3</a>   <font color="#329900"><i> *</font></i>
  <a name="4" href="#4">4</a>   <font color="#329900"><i> * The Apache Software License, Version 1.1</font></i>
  <a name="5" href="#5">5</a>   <font color="#329900"><i> *</font></i>
  <a name="6" href="#6">6</a>   <font color="#329900"><i> * Copyright (c) 1999 The Apache Software Foundation.  All rights </font></i>
  <a name="7" href="#7">7</a>   <font color="#329900"><i> * reserved.</font></i>
  <a name="8" href="#8">8</a>   <font color="#329900"><i> *</font></i>
  <a name="9" href="#9">9</a>   <font color="#329900"><i> * Redistribution and use in source and binary forms, with or without</font></i>
  <a name="10" href="#10">10</a>  <font color="#329900"><i> * modification, are permitted provided that the following conditions</font></i>
  <a name="11" href="#11">11</a>  <font color="#329900"><i> * are met:</font></i>
  <a name="12" href="#12">12</a>  <font color="#329900"><i> *</font></i>
  <a name="13" href="#13">13</a>  <font color="#329900"><i> * 1. Redistributions of source code must retain the above copyright</font></i>
  <a name="14" href="#14">14</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer. </font></i>
  <a name="15" href="#15">15</a>  <font color="#329900"><i> *</font></i>
  <a name="16" href="#16">16</a>  <font color="#329900"><i> * 2. Redistributions in binary form must reproduce the above copyright</font></i>
  <a name="17" href="#17">17</a>  <font color="#329900"><i> *    notice, this list of conditions and the following disclaimer in</font></i>
  <a name="18" href="#18">18</a>  <font color="#329900"><i> *    the documentation and/or other materials provided with the</font></i>
  <a name="19" href="#19">19</a>  <font color="#329900"><i> *    distribution.</font></i>
  <a name="20" href="#20">20</a>  <font color="#329900"><i> *</font></i>
  <a name="21" href="#21">21</a>  <font color="#329900"><i> * 3. The end-user documentation included with the redistribution, if</font></i>
  <a name="22" href="#22">22</a>  <font color="#329900"><i> *    any, must include the following acknowlegement:  </font></i>
  <a name="23" href="#23">23</a>  <font color="#329900"><i> *       "This product includes software developed by the </font></i>
  <a name="24" href="#24">24</a>  <font color="#329900"><i> *        Apache Software Foundation (<a href="http://www.apache.org/" target="alexandria_uri">http://www.apache.org/</a>)."</font></i>
  <a name="25" href="#25">25</a>  <font color="#329900"><i> *    Alternately, this acknowlegement may appear in the software itself,</font></i>
  <a name="26" href="#26">26</a>  <font color="#329900"><i> *    if and wherever such third-party acknowlegements normally appear.</font></i>
  <a name="27" href="#27">27</a>  <font color="#329900"><i> *</font></i>
  <a name="28" href="#28">28</a>  <font color="#329900"><i> * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software</font></i>
  <a name="29" href="#29">29</a>  <font color="#329900"><i> *    Foundation" must not be used to endorse or promote products derived</font></i>
  <a name="30" href="#30">30</a>  <font color="#329900"><i> *    from this software without prior written permission. For written </font></i>
  <a name="31" href="#31">31</a>  <font color="#329900"><i> *    permission, please contact apache@apache.org.</font></i>
  <a name="32" href="#32">32</a>  <font color="#329900"><i> *</font></i>
  <a name="33" href="#33">33</a>  <font color="#329900"><i> * 5. Products derived from this software may not be called "Apache"</font></i>
  <a name="34" href="#34">34</a>  <font color="#329900"><i> *    nor may "Apache" appear in their names without prior written</font></i>
  <a name="35" href="#35">35</a>  <font color="#329900"><i> *    permission of the Apache Group.</font></i>
  <a name="36" href="#36">36</a>  <font color="#329900"><i> *</font></i>
  <a name="37" href="#37">37</a>  <font color="#329900"><i> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED</font></i>
  <a name="38" href="#38">38</a>  <font color="#329900"><i> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES</font></i>
  <a name="39" href="#39">39</a>  <font color="#329900"><i> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</font></i>
  <a name="40" href="#40">40</a>  <font color="#329900"><i> * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR</font></i>
  <a name="41" href="#41">41</a>  <font color="#329900"><i> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</font></i>
  <a name="42" href="#42">42</a>  <font color="#329900"><i> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</font></i>
  <a name="43" href="#43">43</a>  <font color="#329900"><i> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF</font></i>
  <a name="44" href="#44">44</a>  <font color="#329900"><i> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</font></i>
  <a name="45" href="#45">45</a>  <font color="#329900"><i> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</font></i>
  <a name="46" href="#46">46</a>  <font color="#329900"><i> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</font></i>
  <a name="47" href="#47">47</a>  <font color="#329900"><i> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF</font></i>
  <a name="48" href="#48">48</a>  <font color="#329900"><i> * SUCH DAMAGE.</font></i>
  <a name="49" href="#49">49</a>  <font color="#329900"><i> * ====================================================================</font></i>
  <a name="50" href="#50">50</a>  <font color="#329900"><i> *</font></i>
  <a name="51" href="#51">51</a>  <font color="#329900"><i> * This software consists of voluntary contributions made by many</font></i>
  <a name="52" href="#52">52</a>  <font color="#329900"><i> * individuals on behalf of the Apache Software Foundation.  For more</font></i>
  <a name="53" href="#53">53</a>  <font color="#329900"><i> * information on the Apache Software Foundation, please see</font></i>
  <a name="54" href="#54">54</a>  <font color="#329900"><i> * &lt;<a href="http://www.apache.org/&gt" target="alexandria_uri">http://www.apache.org/&gt</a>;.</font></i>
  <a name="55" href="#55">55</a>  <font color="#329900"><i> *</font></i>
  <a name="56" href="#56">56</a>  <font color="#329900"><i> * [Additional notices, if required by prior licensing conditions]</font></i>
  <a name="57" href="#57">57</a>  <font color="#329900"><i> *</font></i>
  <a name="58" href="#58">58</a>  <font color="#329900"><i> */</font></i> 
  <a name="59" href="#59">59</a>  <b>package</b> <a href="../../../../../org/apache/commons/latka/http/index.html">org.apache.commons.latka.http</a>;
  <a name="60" href="#60">60</a>  
  <a name="61" href="#61">61</a>  <font color="#AA0000"><i>/**<font color="#AA0000"><i>* Concrete Implementation of</font></i></font></i>
  <a name="62" href="#62">62</a>  <font color="#AA0000"><i> * {@link org.apache.commons.latka.http.Credentials Credentials}</font></i>
  <a name="63" href="#63">63</a>  <font color="#AA0000"><i> * @see org.apache.commons.latka.http.Credentials</font></i>
  <a name="64" href="#64">64</a>  <font color="#AA0000"><i> */</font></i>
  <a name="65" href="#65">65</a>  <b>public</b> <b>class</b> <a href="../../../../../org/apache/commons/latka/http/CredentialsImpl.html">CredentialsImpl</a> implements <a href="../../../../../org/apache/commons/latka/http/Credentials.html">Credentials</a> {
  <a name="66" href="#66">66</a>  
  <a name="67" href="#67">67</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* holds user name</font></i></font></i>
  <a name="68" href="#68">68</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="69" href="#69">69</a>      <b>protected</b> String _userName = <b>null</b>;
  <a name="70" href="#70">70</a>      
  <a name="71" href="#71">71</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* holds password</font></i></font></i>
  <a name="72" href="#72">72</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="73" href="#73">73</a>      <b>protected</b> String _password = <b>null</b>;
  <a name="74" href="#74">74</a>  
  <a name="75" href="#75">75</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="76" href="#76">76</a>  <font color="#AA0000"><i>     * Create credentials given user name and password</font></i>
  <a name="77" href="#77">77</a>  <font color="#AA0000"><i>     * @param userName the user's name</font></i>
  <a name="78" href="#78">78</a>  <font color="#AA0000"><i>     * @param password the user's password</font></i>
  <a name="79" href="#79">79</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="80" href="#80">80</a>      <b>public</b> <a href="../../../../../org/apache/commons/latka/http/CredentialsImpl.html">CredentialsImpl</a>(String userName, String password) {
  <a name="81" href="#81">81</a>          _userName = userName;
  <a name="82" href="#82">82</a>          _password = password;
  <a name="83" href="#83">83</a>      }
  <a name="84" href="#84">84</a>  
  <a name="85" href="#85">85</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>* </font></i></font></i>
  <a name="86" href="#86">86</a>  <font color="#AA0000"><i>     * return the user's name</font></i>
  <a name="87" href="#87">87</a>  <font color="#AA0000"><i>     * @return the user's name</font></i>
  <a name="88" href="#88">88</a>  <font color="#AA0000"><i>     */</font></i>
  <a name="89" href="#89">89</a>      <b>public</b> String getUserName() {
  <a name="90" href="#90">90</a>          <b>return</b> _userName;
  <a name="91" href="#91">91</a>      }
  <a name="92" href="#92">92</a>  
  <a name="93" href="#93">93</a>      <font color="#AA0000"><i>/**<font color="#AA0000"><i>*</font></i></font></i>
  <a name="94" href="#94">94</a>  <font color="#AA0000"><i>     * return the user's password</font></i>
  <a name="95" href="#95">95</a>  <font color="#AA0000"><i>     * @return the user's password</font></i>
  <a name="96" href="#96">96</a>  <font color="#AA0000"><i>     */</font></i>    
  <a name="97" href="#97">97</a>      <b>public</b> String getPassword() {
  <a name="98" href="#98">98</a>          <b>return</b> _password;
  <a name="99" href="#99">99</a>      }
  <a name="100" href="#100">100</a> }
  </pre>
  <hr><center>This page automatically generated by Maven</center></body>
  </html>
  
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message