Edit D:\app\Administrator\product\11.2.0\dbhome_1\owb\lib\int\HTTPClient\doc\api\HTTPClient\CookieModule.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Mon May 07 18:52:24 PDT 2001 --> <TITLE> HTTPClient API: Class CookieModule </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../HTTPClient/Cookie2.html"><B>PREV CLASS</B></A> <A HREF="../HTTPClient/DefaultAuthHandler.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="CookieModule.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> HTTPClient</FONT> <BR> Class CookieModule</H2> <PRE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">java.lang.Object</A> | +--<B>HTTPClient.CookieModule</B> </PRE> <HR> <DL> <DT>public class <B>CookieModule</B><DT>extends <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A><DT>implements <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></DL> <P> This module handles Netscape cookies (also called Version 0 cookies) and Version 1 cookies. Specifically is reads the <var>Set-Cookie</var> and <var>Set-Cookie2</var> response headers and sets the <var>Cookie</var> and <var>Cookie2</var> headers as neccessary. <P>The accepting and sending of cookies is controlled by a <var>CookiePolicyHandler</var>. This allows you to fine tune your privacy preferences. A cookie is only added to the cookie list if the handler allows it, and a cookie from the cookie list is only sent if the handler allows it. <P>This module expects to be the only one handling cookies. Specifically, it will remove any <var>Cookie</var> and <var>Cookie2</var> header fields found in the request, and it will remove the <var>Set-Cookie</var> and <var>Set-Cookie2</var> header fields in the response (after processing them). In order to add cookies to a request or to prevent cookies from being sent, you can use the <A HREF="../HTTPClient/CookieModule.html#addCookie(HTTPClient.Cookie)"><CODE>addCookie</CODE></A> and <A HREF="../HTTPClient/CookieModule.html#removeCookie(HTTPClient.Cookie)"><CODE>removeCookie</CODE></A> methods to manipulate the module's list of cookies. <P>A cookie jar can be used to store cookies between sessions. This file is read when this class is loaded and is written when the application exits; only cookies from the default context are saved. The name of the file is controlled by the system property <var>HTTPClient.cookies.jar</var> and defaults to a system dependent name. The reading and saving of cookies is enabled by setting the system property <var>HTTPClient.cookies.save</var> to <var>true</var>. <P> <DL> <DT><B>Since: </B><DD>V0.3</DD> <DT><B>Version: </B><DD>0.3-3 06/05/2001</DD> <DT><B>Author: </B><DD>Ronald Tschal?</DD> <DT><B>See Also: </B><DD><a href="http://home.netscape.com/newsref/std/cookie_spec.html">Netscape's cookie spec</a>, <a href="http://www.ietf.org/rfc/rfc2965.txt">HTTP State Management Mechanism spec</a></DL> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="fields_inherited_from_class_HTTPClient.HTTPClientModuleConstants"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from interface HTTPClient.<A HREF="../HTTPClient/HTTPClientModuleConstants.html">HTTPClientModuleConstants</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_CONTINUE">REQ_CONTINUE</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_NEWCON_RST">REQ_NEWCON_RST</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_NEWCON_SND">REQ_NEWCON_SND</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_RESPONSE">REQ_RESPONSE</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_RESTART">REQ_RESTART</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_RETURN">REQ_RETURN</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_SHORTCIRC">REQ_SHORTCIRC</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_CONTINUE">RSP_CONTINUE</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_NEWCON_REQ">RSP_NEWCON_REQ</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_NEWCON_SND">RSP_NEWCON_SND</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_REQUEST">RSP_REQUEST</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_RESTART">RSP_RESTART</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_SEND">RSP_SEND</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_SHORTCIRC">RSP_SHORTCIRC</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#addCookie(HTTPClient.Cookie)">addCookie</A></B>(<A HREF="../HTTPClient/Cookie.html">Cookie</A> cookie)</CODE> <BR> Add the specified cookie to the list of cookies in the default context.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#addCookie(HTTPClient.Cookie, java.lang.Object)">addCookie</A></B>(<A HREF="../HTTPClient/Cookie.html">Cookie</A> cookie, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</CODE> <BR> Add the specified cookie to the list of cookies for the specified context.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#discardAllCookies()">discardAllCookies</A></B>()</CODE> <BR> Discard all cookies for all contexts.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#discardAllCookies(java.lang.Object)">discardAllCookies</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</CODE> <BR> Discard all cookies for the given context.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../HTTPClient/Cookie.html">Cookie</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#listAllCookies()">listAllCookies</A></B>()</CODE> <BR> List all stored cookies for all contexts.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../HTTPClient/Cookie.html">Cookie</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#listAllCookies(java.lang.Object)">listAllCookies</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</CODE> <BR> List all stored cookies for a given context.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#removeCookie(HTTPClient.Cookie)">removeCookie</A></B>(<A HREF="../HTTPClient/Cookie.html">Cookie</A> cookie)</CODE> <BR> Remove the specified cookie from the list of cookies in the default context.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#removeCookie(HTTPClient.Cookie, java.lang.Object)">removeCookie</A></B>(<A HREF="../HTTPClient/Cookie.html">Cookie</A> cookie, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</CODE> <BR> Remove the specified cookie from the list of cookies for the specified context.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#requestHandler(HTTPClient.Request, HTTPClient.Response[])">requestHandler</A></B>(<A HREF="../HTTPClient/Request.html">Request</A> req, <A HREF="../HTTPClient/Response.html">Response</A>[] resp)</CODE> <BR> Invoked by the HTTPClient.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#responsePhase1Handler(HTTPClient.Response, HTTPClient.RoRequest)">responsePhase1Handler</A></B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req)</CODE> <BR> Invoked by the HTTPClient.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#responsePhase2Handler(HTTPClient.Response, HTTPClient.Request)">responsePhase2Handler</A></B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/Request.html">Request</A> req)</CODE> <BR> Invoked by the HTTPClient.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#responsePhase3Handler(HTTPClient.Response, HTTPClient.RoRequest)">responsePhase3Handler</A></B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req)</CODE> <BR> Invoked by the HTTPClient.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../HTTPClient/CookiePolicyHandler.html">CookiePolicyHandler</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#setCookiePolicyHandler(HTTPClient.CookiePolicyHandler)">setCookiePolicyHandler</A></B>(<A HREF="../HTTPClient/CookiePolicyHandler.html">CookiePolicyHandler</A> handler)</CODE> <BR> Sets a new cookie policy handler.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/CookieModule.html#trailerHandler(HTTPClient.Response, HTTPClient.RoRequest)">trailerHandler</A></B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req)</CODE> <BR> Invoked by the HTTPClient.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#toString()">toString</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="requestHandler(HTTPClient.Request, HTTPClient.Response[])"><!-- --></A><H3> requestHandler</H3> <PRE> public int <B>requestHandler</B>(<A HREF="../HTTPClient/Request.html">Request</A> req, <A HREF="../HTTPClient/Response.html">Response</A>[] resp)</PRE> <DL> <DD>Invoked by the HTTPClient.<DD><DL> <DT><B>Specified by: </B><DD><A HREF="../HTTPClient/HTTPClientModule.html#requestHandler(HTTPClient.Request, HTTPClient.Response[])">requestHandler</A> in interface <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></DL> </DD> <DD><B>Tags copied from interface: <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></B></DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>request</CODE> - the request - may be modified as needed<DD><CODE>response</CODE> - the response if the status is REQ_RESPONSE or REQ_RETURN<DT><B>Returns:</B><DD>status code REQ_XXX specifying further action<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - if an IOException occurs on the socket<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception occurs during the handling of the request</DL> </DD> </DL> <HR> <A NAME="responsePhase1Handler(HTTPClient.Response, HTTPClient.RoRequest)"><!-- --></A><H3> responsePhase1Handler</H3> <PRE> public void <B>responsePhase1Handler</B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Invoked by the HTTPClient.<DD><DL> <DT><B>Specified by: </B><DD><A HREF="../HTTPClient/HTTPClientModule.html#responsePhase1Handler(HTTPClient.Response, HTTPClient.RoRequest)">responsePhase1Handler</A> in interface <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></DL> </DD> <DD><B>Tags copied from interface: <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></B></DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>response</CODE> - the response - may be modified<DD><CODE>request</CODE> - the original request<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - if an IOException occurs on the socket<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception occurs during the handling of the response</DL> </DD> </DL> <HR> <A NAME="responsePhase2Handler(HTTPClient.Response, HTTPClient.Request)"><!-- --></A><H3> responsePhase2Handler</H3> <PRE> public int <B>responsePhase2Handler</B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/Request.html">Request</A> req)</PRE> <DL> <DD>Invoked by the HTTPClient.<DD><DL> <DT><B>Specified by: </B><DD><A HREF="../HTTPClient/HTTPClientModule.html#responsePhase2Handler(HTTPClient.Response, HTTPClient.Request)">responsePhase2Handler</A> in interface <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></DL> </DD> <DD><B>Tags copied from interface: <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></B></DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>response</CODE> - the response - may be modified<DD><CODE>request</CODE> - the request; if the status is RSP_REQUEST then this must contain the new request; however do not modify this if you don't return a RSP_REQUEST status.<DT><B>Returns:</B><DD>status code RSP_XXX specifying further action<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - if an IOException occurs on the socket<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception occurs during the handling of the response</DL> </DD> </DL> <HR> <A NAME="responsePhase3Handler(HTTPClient.Response, HTTPClient.RoRequest)"><!-- --></A><H3> responsePhase3Handler</H3> <PRE> public void <B>responsePhase3Handler</B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req)</PRE> <DL> <DD>Invoked by the HTTPClient.<DD><DL> <DT><B>Specified by: </B><DD><A HREF="../HTTPClient/HTTPClientModule.html#responsePhase3Handler(HTTPClient.Response, HTTPClient.RoRequest)">responsePhase3Handler</A> in interface <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></DL> </DD> <DD><B>Tags copied from interface: <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></B></DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>response</CODE> - the response - may be modified<DD><CODE>request</CODE> - the original request<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - if an IOException occurs on the socket<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception occurs during the handling of the response</DL> </DD> </DL> <HR> <A NAME="trailerHandler(HTTPClient.Response, HTTPClient.RoRequest)"><!-- --></A><H3> trailerHandler</H3> <PRE> public void <B>trailerHandler</B>(<A HREF="../HTTPClient/Response.html">Response</A> resp, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Invoked by the HTTPClient.<DD><DL> <DT><B>Specified by: </B><DD><A HREF="../HTTPClient/HTTPClientModule.html#trailerHandler(HTTPClient.Response, HTTPClient.RoRequest)">trailerHandler</A> in interface <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></DL> </DD> <DD><B>Tags copied from interface: <A HREF="../HTTPClient/HTTPClientModule.html">HTTPClientModule</A></B></DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>response</CODE> - the response<DD><CODE>request</CODE> - the request<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - if an IOException occurs on the socket<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception occurs during the handling of the trailers</DL> </DD> </DL> <HR> <A NAME="discardAllCookies()"><!-- --></A><H3> discardAllCookies</H3> <PRE> public static void <B>discardAllCookies</B>()</PRE> <DL> <DD>Discard all cookies for all contexts. Cookies stored in persistent storage are not affected.<DD><DL> </DL> </DD> </DL> <HR> <A NAME="discardAllCookies(java.lang.Object)"><!-- --></A><H3> discardAllCookies</H3> <PRE> public static void <B>discardAllCookies</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</PRE> <DL> <DD>Discard all cookies for the given context. Cookies stored in persistent storage are not affected.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>context</CODE> - the context Object</DL> </DD> </DL> <HR> <A NAME="listAllCookies()"><!-- --></A><H3> listAllCookies</H3> <PRE> public static <A HREF="../HTTPClient/Cookie.html">Cookie</A>[] <B>listAllCookies</B>()</PRE> <DL> <DD>List all stored cookies for all contexts.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an array of all Cookies<DT><B>Since: </B><DD>V0.3-1</DD> </DL> </DD> </DL> <HR> <A NAME="listAllCookies(java.lang.Object)"><!-- --></A><H3> listAllCookies</H3> <PRE> public static <A HREF="../HTTPClient/Cookie.html">Cookie</A>[] <B>listAllCookies</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</PRE> <DL> <DD>List all stored cookies for a given context.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>context</CODE> - the context Object.<DT><B>Returns:</B><DD>an array of Cookies<DT><B>Since: </B><DD>V0.3-1</DD> </DL> </DD> </DL> <HR> <A NAME="addCookie(HTTPClient.Cookie)"><!-- --></A><H3> addCookie</H3> <PRE> public static void <B>addCookie</B>(<A HREF="../HTTPClient/Cookie.html">Cookie</A> cookie)</PRE> <DL> <DD>Add the specified cookie to the list of cookies in the default context. If a compatible cookie (as defined by <var>Cookie.equals()</var>) already exists in the list then it is replaced with the new cookie.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cookie</CODE> - the Cookie to add<DT><B>Since: </B><DD>V0.3-1</DD> </DL> </DD> </DL> <HR> <A NAME="addCookie(HTTPClient.Cookie, java.lang.Object)"><!-- --></A><H3> addCookie</H3> <PRE> public static void <B>addCookie</B>(<A HREF="../HTTPClient/Cookie.html">Cookie</A> cookie, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</PRE> <DL> <DD>Add the specified cookie to the list of cookies for the specified context. If a compatible cookie (as defined by <var>Cookie.equals()</var>) already exists in the list then it is replaced with the new cookie.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cookie</CODE> - the cookie to add<DD><CODE>context</CODE> - the context Object.<DT><B>Since: </B><DD>V0.3-1</DD> </DL> </DD> </DL> <HR> <A NAME="removeCookie(HTTPClient.Cookie)"><!-- --></A><H3> removeCookie</H3> <PRE> public static void <B>removeCookie</B>(<A HREF="../HTTPClient/Cookie.html">Cookie</A> cookie)</PRE> <DL> <DD>Remove the specified cookie from the list of cookies in the default context. If the cookie is not found in the list then this method does nothing.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cookie</CODE> - the Cookie to remove<DT><B>Since: </B><DD>V0.3-1</DD> </DL> </DD> </DL> <HR> <A NAME="removeCookie(HTTPClient.Cookie, java.lang.Object)"><!-- --></A><H3> removeCookie</H3> <PRE> public static void <B>removeCookie</B>(<A HREF="../HTTPClient/Cookie.html">Cookie</A> cookie, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</PRE> <DL> <DD>Remove the specified cookie from the list of cookies for the specified context. If the cookie is not found in the list then this method does nothing.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cookie</CODE> - the cookie to remove<DD><CODE>context</CODE> - the context Object<DT><B>Since: </B><DD>V0.3-1</DD> </DL> </DD> </DL> <HR> <A NAME="setCookiePolicyHandler(HTTPClient.CookiePolicyHandler)"><!-- --></A><H3> setCookiePolicyHandler</H3> <PRE> public static <A HREF="../HTTPClient/CookiePolicyHandler.html">CookiePolicyHandler</A> <B>setCookiePolicyHandler</B>(<A HREF="../HTTPClient/CookiePolicyHandler.html">CookiePolicyHandler</A> handler)</PRE> <DL> <DD>Sets a new cookie policy handler. This handler will be called for each cookie that a server wishes to set and for each cookie that this module wishes to send with a request. In either case the handler may allow or reject the operation. If you wish to blindly accept and send all cookies then just disable the handler with <code>CookieModule.setCookiePolicyHandler(null);</code>. <P>At initialization time a default handler is installed. This handler allows all cookies to be sent. For any cookie that a server wishes to be set two lists are consulted. If the server matches any host or domain in the reject list then the cookie is rejected; if the server matches any host or domain in the accept list then the cookie is accepted (in that order). If no host or domain match is found in either of these two lists and user interaction is allowed then a dialog box is poped up to ask the user whether to accept or reject the cookie; if user interaction is not allowed the cookie is accepted. <P>The accept and reject lists in the default handler are initialized at startup from the two properties <var>HTTPClient.cookies.hosts.accept</var> and <var>HTTPClient.cookies.hosts.reject</var>. These properties must contain a "|" separated list of host and domain names. All names beginning with a "." are treated as domain names, all others as host names. An empty string will match all hosts. The two lists are further expanded if the user chooses one of the "Accept All from Domain" or "Reject All from Domain" buttons in the dialog box. <P>Note: the default handler does not implement the rules concerning unverifiable transactions (section 3.3.6, <A HREF="http://www.ietf.org/rfc/rfc2965.txt">RFC-2965</A>). The reason for this is simple: the default handler knows nothing about the application using this client, and it therefore does not have enough information to determine when a request is verifiable and when not. You are therefore encouraged to provide your own handler which implements section 3.3.6 (use the <code>CookiePolicyHandler.sendCookie</code> method for this).<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>handler</CODE> - the new policy handler<DT><B>Returns:</B><DD>the previous policy handler</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../HTTPClient/Cookie2.html"><B>PREV CLASS</B></A> <A HREF="../HTTPClient/DefaultAuthHandler.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="CookieModule.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de