| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>NewCookie</title> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="NewCookie"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../javax/ws/rs/core/MultivaluedMap.html" title="interface in javax.ws.rs.core"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../javax/ws/rs/core/NoContentException.html" title="class in javax.ws.rs.core"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?javax/ws/rs/core/NewCookie.html" target="_top">Frames</a></li> |
| <li><a href="NewCookie.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">javax.ws.rs.core</div> |
| <h2 title="Class NewCookie" class="title">Class NewCookie</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">javax.ws.rs.core.Cookie</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>javax.ws.rs.core.NewCookie</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">NewCookie</span> |
| extends <a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a></pre> |
| <div class="block">Used to create a new HTTP cookie, transferred in a response.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="http://www.ietf.org/rfc/rfc2109.txt">IETF RFC 2109</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#DEFAULT_MAX_AGE">DEFAULT_MAX_AGE</a></span></code> |
| <div class="block">Specifies that the cookie expires with the current application/browser session.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.javax.ws.rs.core.Cookie"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class javax.ws.rs.core.<a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a></h3> |
| <code><a href="../../../../javax/ws/rs/core/Cookie.html#DEFAULT_VERSION">DEFAULT_VERSION</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#NewCookie-javax.ws.rs.core.Cookie-">NewCookie</a></span>(<a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a> cookie)</code> |
| <div class="block">Create a new instance copying the information in the supplied cookie.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#NewCookie-javax.ws.rs.core.Cookie-java.lang.String-int-boolean-">NewCookie</a></span>(<a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a> cookie, |
| java.lang.String comment, |
| int maxAge, |
| boolean secure)</code> |
| <div class="block">Create a new instance supplementing the information in the supplied cookie.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#NewCookie-javax.ws.rs.core.Cookie-java.lang.String-int-java.util.Date-boolean-boolean-">NewCookie</a></span>(<a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a> cookie, |
| java.lang.String comment, |
| int maxAge, |
| java.util.Date expiry, |
| boolean secure, |
| boolean httpOnly)</code> |
| <div class="block">Create a new instance supplementing the information in the supplied cookie.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#NewCookie-java.lang.String-java.lang.String-">NewCookie</a></span>(java.lang.String name, |
| java.lang.String value)</code> |
| <div class="block">Create a new instance.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#NewCookie-java.lang.String-java.lang.String-java.lang.String-java.lang.String-int-java.lang.String-int-boolean-">NewCookie</a></span>(java.lang.String name, |
| java.lang.String value, |
| java.lang.String path, |
| java.lang.String domain, |
| int version, |
| java.lang.String comment, |
| int maxAge, |
| boolean secure)</code> |
| <div class="block">Create a new instance.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#NewCookie-java.lang.String-java.lang.String-java.lang.String-java.lang.String-int-java.lang.String-int-java.util.Date-boolean-boolean-">NewCookie</a></span>(java.lang.String name, |
| java.lang.String value, |
| java.lang.String path, |
| java.lang.String domain, |
| int version, |
| java.lang.String comment, |
| int maxAge, |
| java.util.Date expiry, |
| boolean secure, |
| boolean httpOnly)</code> |
| <div class="block">Create a new instance.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#NewCookie-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-int-boolean-">NewCookie</a></span>(java.lang.String name, |
| java.lang.String value, |
| java.lang.String path, |
| java.lang.String domain, |
| java.lang.String comment, |
| int maxAge, |
| boolean secure)</code> |
| <div class="block">Create a new instance.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#NewCookie-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-int-boolean-boolean-">NewCookie</a></span>(java.lang.String name, |
| java.lang.String value, |
| java.lang.String path, |
| java.lang.String domain, |
| java.lang.String comment, |
| int maxAge, |
| boolean secure, |
| boolean httpOnly)</code> |
| <div class="block">Create a new instance.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object obj)</code> |
| <div class="block">Compare for equality.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#getComment--">getComment</a></span>()</code> |
| <div class="block">Get the comment associated with the cookie.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>java.util.Date</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#getExpiry--">getExpiry</a></span>()</code> |
| <div class="block">Get the cookie expiry date.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#getMaxAge--">getMaxAge</a></span>()</code> |
| <div class="block">Get the maximum age of the the cookie in seconds.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#hashCode--">hashCode</a></span>()</code> |
| <div class="block">Generate a hash code by hashing all of the properties.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#isHttpOnly--">isHttpOnly</a></span>()</code> |
| <div class="block">Returns <code>true</code> if this cookie contains the <code>HttpOnly</code> attribute.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#isSecure--">isSecure</a></span>()</code> |
| <div class="block">Whether the cookie will only be sent over a secure connection.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#toCookie--">toCookie</a></span>()</code> |
| <div class="block">Obtain a new instance of a <a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core"><code>Cookie</code></a> with the same name, value, path, |
| domain and version as this <code>NewCookie</code>.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#toString--">toString</a></span>()</code> |
| <div class="block">Convert the cookie to a string suitable for use as the value of the |
| corresponding HTTP header.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../javax/ws/rs/core/NewCookie.html" title="class in javax.ws.rs.core">NewCookie</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../javax/ws/rs/core/NewCookie.html#valueOf-java.lang.String-">valueOf</a></span>(java.lang.String value)</code> |
| <div class="block">Creates a new instance of NewCookie by parsing the supplied string.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.javax.ws.rs.core.Cookie"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class javax.ws.rs.core.<a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a></h3> |
| <code><a href="../../../../javax/ws/rs/core/Cookie.html#getDomain--">getDomain</a>, <a href="../../../../javax/ws/rs/core/Cookie.html#getName--">getName</a>, <a href="../../../../javax/ws/rs/core/Cookie.html#getPath--">getPath</a>, <a href="../../../../javax/ws/rs/core/Cookie.html#getValue--">getValue</a>, <a href="../../../../javax/ws/rs/core/Cookie.html#getVersion--">getVersion</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="DEFAULT_MAX_AGE"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DEFAULT_MAX_AGE</h4> |
| <pre>public static final int DEFAULT_MAX_AGE</pre> |
| <div class="block">Specifies that the cookie expires with the current application/browser session.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#javax.ws.rs.core.NewCookie.DEFAULT_MAX_AGE">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="NewCookie-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NewCookie</h4> |
| <pre>public NewCookie(java.lang.String name, |
| java.lang.String value)</pre> |
| <div class="block">Create a new instance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the cookie.</dd> |
| <dd><code>value</code> - the value of the cookie.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if name is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NewCookie-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-int-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NewCookie</h4> |
| <pre>public NewCookie(java.lang.String name, |
| java.lang.String value, |
| java.lang.String path, |
| java.lang.String domain, |
| java.lang.String comment, |
| int maxAge, |
| boolean secure)</pre> |
| <div class="block">Create a new instance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the cookie.</dd> |
| <dd><code>value</code> - the value of the cookie.</dd> |
| <dd><code>path</code> - the URI path for which the cookie is valid.</dd> |
| <dd><code>domain</code> - the host domain for which the cookie is valid.</dd> |
| <dd><code>comment</code> - the comment.</dd> |
| <dd><code>maxAge</code> - the maximum age of the cookie in seconds.</dd> |
| <dd><code>secure</code> - specifies whether the cookie will only be sent over a secure connection.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if name is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NewCookie-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-int-boolean-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NewCookie</h4> |
| <pre>public NewCookie(java.lang.String name, |
| java.lang.String value, |
| java.lang.String path, |
| java.lang.String domain, |
| java.lang.String comment, |
| int maxAge, |
| boolean secure, |
| boolean httpOnly)</pre> |
| <div class="block">Create a new instance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the cookie.</dd> |
| <dd><code>value</code> - the value of the cookie.</dd> |
| <dd><code>path</code> - the URI path for which the cookie is valid.</dd> |
| <dd><code>domain</code> - the host domain for which the cookie is valid.</dd> |
| <dd><code>comment</code> - the comment.</dd> |
| <dd><code>maxAge</code> - the maximum age of the cookie in seconds.</dd> |
| <dd><code>secure</code> - specifies whether the cookie will only be sent over a secure connection.</dd> |
| <dd><code>httpOnly</code> - if <code>true</code> make the cookie HTTP only, i.e. only visible as part of an HTTP request.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if name is <code>null</code>.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NewCookie-java.lang.String-java.lang.String-java.lang.String-java.lang.String-int-java.lang.String-int-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NewCookie</h4> |
| <pre>public NewCookie(java.lang.String name, |
| java.lang.String value, |
| java.lang.String path, |
| java.lang.String domain, |
| int version, |
| java.lang.String comment, |
| int maxAge, |
| boolean secure)</pre> |
| <div class="block">Create a new instance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the cookie</dd> |
| <dd><code>value</code> - the value of the cookie</dd> |
| <dd><code>path</code> - the URI path for which the cookie is valid</dd> |
| <dd><code>domain</code> - the host domain for which the cookie is valid</dd> |
| <dd><code>version</code> - the version of the specification to which the cookie complies</dd> |
| <dd><code>comment</code> - the comment</dd> |
| <dd><code>maxAge</code> - the maximum age of the cookie in seconds</dd> |
| <dd><code>secure</code> - specifies whether the cookie will only be sent over a secure connection</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if name is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NewCookie-java.lang.String-java.lang.String-java.lang.String-java.lang.String-int-java.lang.String-int-java.util.Date-boolean-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NewCookie</h4> |
| <pre>public NewCookie(java.lang.String name, |
| java.lang.String value, |
| java.lang.String path, |
| java.lang.String domain, |
| int version, |
| java.lang.String comment, |
| int maxAge, |
| java.util.Date expiry, |
| boolean secure, |
| boolean httpOnly)</pre> |
| <div class="block">Create a new instance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - the name of the cookie</dd> |
| <dd><code>value</code> - the value of the cookie</dd> |
| <dd><code>path</code> - the URI path for which the cookie is valid</dd> |
| <dd><code>domain</code> - the host domain for which the cookie is valid</dd> |
| <dd><code>version</code> - the version of the specification to which the cookie complies</dd> |
| <dd><code>comment</code> - the comment</dd> |
| <dd><code>maxAge</code> - the maximum age of the cookie in seconds</dd> |
| <dd><code>expiry</code> - the cookie expiry date.</dd> |
| <dd><code>secure</code> - specifies whether the cookie will only be sent over a secure connection</dd> |
| <dd><code>httpOnly</code> - if <code>true</code> make the cookie HTTP only, i.e. only visible as part of an HTTP request.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if name is <code>null</code>.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NewCookie-javax.ws.rs.core.Cookie-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NewCookie</h4> |
| <pre>public NewCookie(<a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a> cookie)</pre> |
| <div class="block">Create a new instance copying the information in the supplied cookie.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cookie</code> - the cookie to clone.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if cookie is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NewCookie-javax.ws.rs.core.Cookie-java.lang.String-int-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NewCookie</h4> |
| <pre>public NewCookie(<a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a> cookie, |
| java.lang.String comment, |
| int maxAge, |
| boolean secure)</pre> |
| <div class="block">Create a new instance supplementing the information in the supplied cookie.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cookie</code> - the cookie to clone.</dd> |
| <dd><code>comment</code> - the comment.</dd> |
| <dd><code>maxAge</code> - the maximum age of the cookie in seconds.</dd> |
| <dd><code>secure</code> - specifies whether the cookie will only be sent over a secure connection.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if cookie is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="NewCookie-javax.ws.rs.core.Cookie-java.lang.String-int-java.util.Date-boolean-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>NewCookie</h4> |
| <pre>public NewCookie(<a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a> cookie, |
| java.lang.String comment, |
| int maxAge, |
| java.util.Date expiry, |
| boolean secure, |
| boolean httpOnly)</pre> |
| <div class="block">Create a new instance supplementing the information in the supplied cookie.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>cookie</code> - the cookie to clone.</dd> |
| <dd><code>comment</code> - the comment.</dd> |
| <dd><code>maxAge</code> - the maximum age of the cookie in seconds.</dd> |
| <dd><code>expiry</code> - the cookie expiry date.</dd> |
| <dd><code>secure</code> - specifies whether the cookie will only be sent over a secure connection.</dd> |
| <dd><code>httpOnly</code> - if <code>true</code> make the cookie HTTP only, i.e. only visible as part of an HTTP request.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if cookie is <code>null</code>.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="valueOf-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>valueOf</h4> |
| <pre>public static <a href="../../../../javax/ws/rs/core/NewCookie.html" title="class in javax.ws.rs.core">NewCookie</a> valueOf(java.lang.String value)</pre> |
| <div class="block">Creates a new instance of NewCookie by parsing the supplied string.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - the cookie string.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly created <code>NewCookie</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.IllegalArgumentException</code> - if the supplied string cannot be parsed |
| or is <code>null</code>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getComment--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getComment</h4> |
| <pre>public java.lang.String getComment()</pre> |
| <div class="block">Get the comment associated with the cookie.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the comment or null if none set</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxAge--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxAge</h4> |
| <pre>public int getMaxAge()</pre> |
| <div class="block">Get the maximum age of the the cookie in seconds. Cookies older than |
| the maximum age are discarded. A cookie can be unset by sending a new |
| cookie with maximum age of 0 since it will overwrite any existing cookie |
| and then be immediately discarded. The default value of <code>-1</code> indicates |
| that the cookie will be discarded at the end of the browser/application session. |
| <p> |
| Note that it is recommended to use <code>Max-Age</code> to control cookie |
| expiration, however some browsers do not understand <code>Max-Age</code>, in which case |
| setting <a href="../../../../javax/ws/rs/core/NewCookie.html#getExpiry--"><code>getExpiry()</code></a> Expires} parameter may be necessary. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the maximum age in seconds.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../javax/ws/rs/core/NewCookie.html#getExpiry--"><code>getExpiry()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getExpiry--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getExpiry</h4> |
| <pre>public java.util.Date getExpiry()</pre> |
| <div class="block">Get the cookie expiry date. Cookies whose expiry date has passed are discarded. |
| A cookie can be unset by setting a new cookie with an expiry date in the past, |
| typically the lowest possible date that can be set. |
| <p> |
| Note that it is recommended to use <a href="../../../../javax/ws/rs/core/NewCookie.html#getMaxAge--"><code>Max-Age</code></a> to control cookie |
| expiration, however some browsers do not understand <code>Max-Age</code>, in which case |
| setting <code>Expires</code> parameter may be necessary. |
| </p></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>cookie expiry date or <code>null</code> if no expiry date was set.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../javax/ws/rs/core/NewCookie.html#getMaxAge--"><code>getMaxAge()</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSecure--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSecure</h4> |
| <pre>public boolean isSecure()</pre> |
| <div class="block">Whether the cookie will only be sent over a secure connection. Defaults |
| to <code>false</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the cookie will only be sent over a secure connection, |
| <code>false</code> otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isHttpOnly--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isHttpOnly</h4> |
| <pre>public boolean isHttpOnly()</pre> |
| <div class="block">Returns <code>true</code> if this cookie contains the <code>HttpOnly</code> attribute. |
| This means that the cookie should not be accessible to scripting engines, |
| like javascript.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if this cookie should be considered http only, <code>false</code> |
| otherwise.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toCookie--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toCookie</h4> |
| <pre>public <a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a> toCookie()</pre> |
| <div class="block">Obtain a new instance of a <a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core"><code>Cookie</code></a> with the same name, value, path, |
| domain and version as this <code>NewCookie</code>. This method can be used to |
| obtain an object that can be compared for equality with another <code>Cookie</code>; |
| since a <code>Cookie</code> will never compare equal to a <code>NewCookie</code>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core"><code>Cookie</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public java.lang.String toString()</pre> |
| <div class="block">Convert the cookie to a string suitable for use as the value of the |
| corresponding HTTP header.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../javax/ws/rs/core/Cookie.html#toString--">toString</a></code> in class <code><a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a stringified cookie.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hashCode--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre>public int hashCode()</pre> |
| <div class="block">Generate a hash code by hashing all of the properties.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../javax/ws/rs/core/Cookie.html#hashCode--">hashCode</a></code> in class <code><a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the hash code.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="equals-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre>public boolean equals(java.lang.Object obj)</pre> |
| <div class="block">Compare for equality. Use <a href="../../../../javax/ws/rs/core/NewCookie.html#toCookie--"><code>toCookie()</code></a> to compare a |
| <code>NewCookie</code> to a <code>Cookie</code> considering only the common |
| properties.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../javax/ws/rs/core/Cookie.html#equals-java.lang.Object-">equals</a></code> in class <code><a href="../../../../javax/ws/rs/core/Cookie.html" title="class in javax.ws.rs.core">Cookie</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>obj</code> - the object to compare to</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the object is a <code>NewCookie</code> with the same value for |
| all properties, false otherwise.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../javax/ws/rs/core/MultivaluedMap.html" title="interface in javax.ws.rs.core"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../javax/ws/rs/core/NoContentException.html" title="class in javax.ws.rs.core"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?javax/ws/rs/core/NewCookie.html" target="_top">Frames</a></li> |
| <li><a href="NewCookie.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |