Mercurial > hg > AnnotationManager
view libs/httpcomponents-client-4.0-beta1/javadoc/httpclient/org/apache/http/cookie/Cookie.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> Cookie (HttpClient 4.0-beta1 API) </TITLE> <META NAME="keywords" CONTENT="org.apache.http.cookie.Cookie interface"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="Cookie (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/Cookie.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/ClientCookie.html" title="interface in org.apache.http.cookie"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/http/cookie/CookieAttributeHandler.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/Cookie.html" target="_top"><B>FRAMES</B></A> <A HREF="Cookie.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 Cookie</H2> <DL> <DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../org/apache/http/cookie/ClientCookie.html" title="interface in org.apache.http.cookie">ClientCookie</A>, <A HREF="../../../../org/apache/http/cookie/SetCookie.html" title="interface in org.apache.http.cookie">SetCookie</A>, <A HREF="../../../../org/apache/http/cookie/SetCookie2.html" title="interface in org.apache.http.cookie">SetCookie2</A></DD> </DL> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/http/impl/cookie/BasicClientCookie.html" title="class in org.apache.http.impl.cookie">BasicClientCookie</A>, <A HREF="../../../../org/apache/http/impl/cookie/BasicClientCookie2.html" title="class in org.apache.http.impl.cookie">BasicClientCookie2</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>Cookie</B></DL> </PRE> <P> HTTP "magic-cookie" represents a piece of state information that the HTTP agent and the target server can exchange to maintain a session. <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></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.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/Cookie.html#getComment()">getComment</A></B>()</CODE> <BR> Returns the comment describing the purpose of this cookie, or <tt>null</tt> if no such comment has been defined.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/Cookie.html#getCommentURL()">getCommentURL</A></B>()</CODE> <BR> If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described by the information at this URL.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/Cookie.html#getDomain()">getDomain</A></B>()</CODE> <BR> Returns domain attribute of the cookie.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.Date</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/Cookie.html#getExpiryDate()">getExpiryDate</A></B>()</CODE> <BR> Returns the expiration <CODE>Date</CODE> of the cookie, or <tt>null</tt> if none exists.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/Cookie.html#getName()">getName</A></B>()</CODE> <BR> Returns the name.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/Cookie.html#getPath()">getPath</A></B>()</CODE> <BR> Returns the path attribute of the cookie</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/Cookie.html#getPorts()">getPorts</A></B>()</CODE> <BR> Get the Port attribute.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/http/cookie/Cookie.html#getValue()">getValue</A></B>()</CODE> <BR> Returns the value.</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/Cookie.html#getVersion()">getVersion</A></B>()</CODE> <BR> Returns the version of the cookie specification to which this cookie conforms.</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/Cookie.html#isExpired(java.util.Date)">isExpired</A></B>(java.util.Date date)</CODE> <BR> Returns true if this cookie has expired.</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/Cookie.html#isPersistent()">isPersistent</A></B>()</CODE> <BR> Returns <tt>false</tt> if the cookie should be discarded at the end of the "session"; <tt>true</tt> otherwise.</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/Cookie.html#isSecure()">isSecure</A></B>()</CODE> <BR> Indicates whether this cookie requires a secure connection.</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="getName()"><!-- --></A><H3> getName</H3> <PRE> java.lang.String <B>getName</B>()</PRE> <DL> <DD>Returns the name. <P> <DD><DL> <DT><B>Returns:</B><DD>String name The name</DL> </DD> </DL> <HR> <A NAME="getValue()"><!-- --></A><H3> getValue</H3> <PRE> java.lang.String <B>getValue</B>()</PRE> <DL> <DD>Returns the value. <P> <DD><DL> <DT><B>Returns:</B><DD>String value The current value.</DL> </DD> </DL> <HR> <A NAME="getComment()"><!-- --></A><H3> getComment</H3> <PRE> java.lang.String <B>getComment</B>()</PRE> <DL> <DD>Returns the comment describing the purpose of this cookie, or <tt>null</tt> if no such comment has been defined. <P> <DD><DL> <DT><B>Returns:</B><DD>comment</DL> </DD> </DL> <HR> <A NAME="getCommentURL()"><!-- --></A><H3> getCommentURL</H3> <PRE> java.lang.String <B>getCommentURL</B>()</PRE> <DL> <DD>If a user agent (web browser) presents this cookie to a user, the cookie's purpose will be described by the information at this URL. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getExpiryDate()"><!-- --></A><H3> getExpiryDate</H3> <PRE> java.util.Date <B>getExpiryDate</B>()</PRE> <DL> <DD>Returns the expiration <CODE>Date</CODE> of the cookie, or <tt>null</tt> if none exists. <p><strong>Note:</strong> the object returned by this method is considered immutable. Changing it (e.g. using setTime()) could result in undefined behaviour. Do so at your peril. </p> <P> <DD><DL> <DT><B>Returns:</B><DD>Expiration <CODE>Date</CODE>, or <tt>null</tt>.</DL> </DD> </DL> <HR> <A NAME="isPersistent()"><!-- --></A><H3> isPersistent</H3> <PRE> boolean <B>isPersistent</B>()</PRE> <DL> <DD>Returns <tt>false</tt> if the cookie should be discarded at the end of the "session"; <tt>true</tt> otherwise. <P> <DD><DL> <DT><B>Returns:</B><DD><tt>false</tt> if the cookie should be discarded at the end of the "session"; <tt>true</tt> otherwise</DL> </DD> </DL> <HR> <A NAME="getDomain()"><!-- --></A><H3> getDomain</H3> <PRE> java.lang.String <B>getDomain</B>()</PRE> <DL> <DD>Returns domain attribute of the cookie. <P> <DD><DL> <DT><B>Returns:</B><DD>the value of the domain attribute</DL> </DD> </DL> <HR> <A NAME="getPath()"><!-- --></A><H3> getPath</H3> <PRE> java.lang.String <B>getPath</B>()</PRE> <DL> <DD>Returns the path attribute of the cookie <P> <DD><DL> <DT><B>Returns:</B><DD>The value of the path attribute.</DL> </DD> </DL> <HR> <A NAME="getPorts()"><!-- --></A><H3> getPorts</H3> <PRE> int[] <B>getPorts</B>()</PRE> <DL> <DD>Get the Port attribute. It restricts the ports to which a cookie may be returned in a Cookie request header. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="isSecure()"><!-- --></A><H3> isSecure</H3> <PRE> boolean <B>isSecure</B>()</PRE> <DL> <DD>Indicates whether this cookie requires a secure connection. <P> <DD><DL> <DT><B>Returns:</B><DD><code>true</code> if this cookie should only be sent over secure connections, <code>false</code> otherwise.</DL> </DD> </DL> <HR> <A NAME="getVersion()"><!-- --></A><H3> getVersion</H3> <PRE> int <B>getVersion</B>()</PRE> <DL> <DD>Returns the version of the cookie specification to which this cookie conforms. <P> <DD><DL> <DT><B>Returns:</B><DD>the version of the cookie.</DL> </DD> </DL> <HR> <A NAME="isExpired(java.util.Date)"><!-- --></A><H3> isExpired</H3> <PRE> boolean <B>isExpired</B>(java.util.Date date)</PRE> <DL> <DD>Returns true if this cookie has expired. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>date</CODE> - Current time <DT><B>Returns:</B><DD><tt>true</tt> if the cookie has expired.</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/Cookie.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/ClientCookie.html" title="interface in org.apache.http.cookie"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/http/cookie/CookieAttributeHandler.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/Cookie.html" target="_top"><B>FRAMES</B></A> <A HREF="Cookie.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>