Mercurial > hg > AnnotationManager
view libs/httpcomponents-client-4.0-beta1/javadoc/httpclient/org/apache/http/cookie/CookieSpec.html @ 5:0be9d53a6967
editor for annotations
author | dwinter |
---|---|
date | Tue, 13 Dec 2011 17:43:46 +0100 |
parents | |
children |
line wrap: on
line source
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_11) on Sat Aug 23 11:49:49 GMT+01:00 2008 --> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <TITLE> CookieSpec (HttpClient 4.0-beta1 API) </TITLE> <META NAME="keywords" CONTENT="org.apache.http.cookie.CookieSpec interface"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="CookieSpec (HttpClient 4.0-beta1 API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="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="class-use/CookieSpec.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="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="../../../../org/apache/http/cookie/CookiePathComparator.html" title="class in org.apache.http.cookie"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/http/cookie/CookieSpecFactory.html" title="interface in org.apache.http.cookie"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/apache/http/cookie/CookieSpec.html" target="_top"><B>FRAMES</B></A> <A HREF="CookieSpec.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | 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> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.http.cookie</FONT> <BR> Interface CookieSpec</H2> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/http/impl/cookie/AbstractCookieSpec.html" title="class in org.apache.http.impl.cookie">AbstractCookieSpec</A>, <A HREF="../../../../org/apache/http/impl/cookie/BestMatchSpec.html" title="class in org.apache.http.impl.cookie">BestMatchSpec</A>, <A HREF="../../../../org/apache/http/impl/cookie/BrowserCompatSpec.html" title="class in org.apache.http.impl.cookie">BrowserCompatSpec</A>, <A HREF="../../../../org/apache/http/impl/cookie/CookieSpecBase.html" title="class in org.apache.http.impl.cookie">CookieSpecBase</A>, <A HREF="../../../../org/apache/http/impl/cookie/NetscapeDraftSpec.html" title="class in org.apache.http.impl.cookie">NetscapeDraftSpec</A>, <A HREF="../../../../org/apache/http/impl/cookie/RFC2109Spec.html" title="class in org.apache.http.impl.cookie">RFC2109Spec</A>, <A HREF="../../../../org/apache/http/impl/cookie/RFC2965Spec.html" title="class in org.apache.http.impl.cookie">RFC2965Spec</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>CookieSpec</B></DL> </PRE> <P> Defines the cookie management specification. <p>Cookie management specification must define <ul> <li> rules of parsing "Set-Cookie" header <li> rules of validation of parsed cookies <li> formatting of "Cookie" header </ul> for a given host, port and path of origin <P> <P> <DL> <DT><B>Since:</B></DT> <DD>4.0</DD> <DT><B>Author:</B></DT> <DD><a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>, <a href="mailto:jsdever@apache.org">Jeff Dever</a></DD> </DL> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.List<org.apache.http.Header></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/CookieSpec.html#formatCookies(java.util.List)">formatCookies</A></B>(java.util.List<<A HREF="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</A>> cookies)</CODE> <BR> Create <tt>"Cookie"</tt> headers for an array of Cookies.</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="../../../../org/apache/http/cookie/CookieSpec.html#getVersion()">getVersion</A></B>()</CODE> <BR> Returns version of the state management this cookie specification conforms to.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> org.apache.http.Header</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/CookieSpec.html#getVersionHeader()">getVersionHeader</A></B>()</CODE> <BR> Returns a request header identifying what version of the state management specification is understood.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/CookieSpec.html#match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin)">match</A></B>(<A HREF="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</A> cookie, <A HREF="../../../../org/apache/http/cookie/CookieOrigin.html" title="class in org.apache.http.cookie">CookieOrigin</A> origin)</CODE> <BR> Determines if a Cookie matches the target location.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.List<<A HREF="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/CookieSpec.html#parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin)">parse</A></B>(org.apache.http.Header header, <A HREF="../../../../org/apache/http/cookie/CookieOrigin.html" title="class in org.apache.http.cookie">CookieOrigin</A> origin)</CODE> <BR> Parse the <tt>"Set-Cookie"</tt> Header into an array of Cookies.</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="../../../../org/apache/http/cookie/CookieSpec.html#validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin)">validate</A></B>(<A HREF="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</A> cookie, <A HREF="../../../../org/apache/http/cookie/CookieOrigin.html" title="class in org.apache.http.cookie">CookieOrigin</A> origin)</CODE> <BR> Validate the cookie according to validation rules defined by the cookie specification.</TD> </TR> </TABLE> <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getVersion()"><!-- --></A><H3> getVersion</H3> <PRE> int <B>getVersion</B>()</PRE> <DL> <DD>Returns version of the state management this cookie specification conforms to. <P> <DD><DL> <DT><B>Returns:</B><DD>version of the state management specification</DL> </DD> </DL> <HR> <A NAME="parse(org.apache.http.Header, org.apache.http.cookie.CookieOrigin)"><!-- --></A><H3> parse</H3> <PRE> java.util.List<<A HREF="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</A>> <B>parse</B>(org.apache.http.Header header, <A HREF="../../../../org/apache/http/cookie/CookieOrigin.html" title="class in org.apache.http.cookie">CookieOrigin</A> origin) throws <A HREF="../../../../org/apache/http/cookie/MalformedCookieException.html" title="class in org.apache.http.cookie">MalformedCookieException</A></PRE> <DL> <DD>Parse the <tt>"Set-Cookie"</tt> Header into an array of Cookies. <p>This method will not perform the validation of the resultant <A HREF="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie"><CODE>Cookie</CODE></A>s</p> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>header</CODE> - the <tt>Set-Cookie</tt> received from the server<DD><CODE>origin</CODE> - details of the cookie origin <DT><B>Returns:</B><DD>an array of <tt>Cookie</tt>s parsed from the header <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../org/apache/http/cookie/MalformedCookieException.html" title="class in org.apache.http.cookie">MalformedCookieException</A></CODE> - if an exception occurs during parsing<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/http/cookie/CookieSpec.html#validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin)"><CODE>validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin)</CODE></A></DL> </DD> </DL> <HR> <A NAME="validate(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin)"><!-- --></A><H3> validate</H3> <PRE> void <B>validate</B>(<A HREF="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</A> cookie, <A HREF="../../../../org/apache/http/cookie/CookieOrigin.html" title="class in org.apache.http.cookie">CookieOrigin</A> origin) throws <A HREF="../../../../org/apache/http/cookie/MalformedCookieException.html" title="class in org.apache.http.cookie">MalformedCookieException</A></PRE> <DL> <DD>Validate the cookie according to validation rules defined by the cookie specification. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cookie</CODE> - the Cookie to validate<DD><CODE>origin</CODE> - details of the cookie origin <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../org/apache/http/cookie/MalformedCookieException.html" title="class in org.apache.http.cookie">MalformedCookieException</A></CODE> - if the cookie is invalid</DL> </DD> </DL> <HR> <A NAME="match(org.apache.http.cookie.Cookie, org.apache.http.cookie.CookieOrigin)"><!-- --></A><H3> match</H3> <PRE> boolean <B>match</B>(<A HREF="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</A> cookie, <A HREF="../../../../org/apache/http/cookie/CookieOrigin.html" title="class in org.apache.http.cookie">CookieOrigin</A> origin)</PRE> <DL> <DD>Determines if a Cookie matches the target location. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cookie</CODE> - the Cookie to be matched<DD><CODE>origin</CODE> - the target to test against <DT><B>Returns:</B><DD><tt>true</tt> if the cookie should be submitted with a request with given attributes, <tt>false</tt> otherwise.</DL> </DD> </DL> <HR> <A NAME="formatCookies(java.util.List)"><!-- --></A><H3> formatCookies</H3> <PRE> java.util.List<org.apache.http.Header> <B>formatCookies</B>(java.util.List<<A HREF="../../../../org/apache/http/cookie/Cookie.html" title="interface in org.apache.http.cookie">Cookie</A>> cookies)</PRE> <DL> <DD>Create <tt>"Cookie"</tt> headers for an array of Cookies. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cookies</CODE> - the Cookies format into a Cookie header <DT><B>Returns:</B><DD>a Header for the given Cookies. <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - if an input parameter is illegal</DL> </DD> </DL> <HR> <A NAME="getVersionHeader()"><!-- --></A><H3> getVersionHeader</H3> <PRE> org.apache.http.Header <B>getVersionHeader</B>()</PRE> <DL> <DD>Returns a request header identifying what version of the state management specification is understood. May be <code>null</code> if the cookie specification does not support <tt>Cookie2</tt> header. <P> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="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="class-use/CookieSpec.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="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="../../../../org/apache/http/cookie/CookiePathComparator.html" title="class in org.apache.http.cookie"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/http/cookie/CookieSpecFactory.html" title="interface in org.apache.http.cookie"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/apache/http/cookie/CookieSpec.html" target="_top"><B>FRAMES</B></A> <A HREF="CookieSpec.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | 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> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright © 1999-2008 <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved. </BODY> </HTML>