ServerCookies (Apache Tomcat 8.5.94 API Documentation)

Package org.apache.tomcat.util.http

## Class ServerCookies

- java.lang.Object
- - org.apache.tomcat.util.http.ServerCookies

-     public class ServerCookies
      extends java.lang.Object

  This class is not thread-safe.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ServerCookies​(int initialSize)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ServerCookie` | `addCookie()` | Register a new, initialized cookie.
    `ServerCookie` | `getCookie​(int idx)` |
    `int` | `getCookieCount()` |
    `void` | `recycle()` |
    `void` | `setLimit​(int limit)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ServerCookies

          public ServerCookies​(int initialSize)

  - ### Method Detail

    - #### addCookie

          public ServerCookie addCookie()

      Register a new, initialized cookie. Cookies are recycled, and most of the time an existing ServerCookie object is returned. The caller can set the name/value and attributes for the cookie.
      Returns:
        the new cookie

    - #### getCookie

          public ServerCookie getCookie​(int idx)

    - #### getCookieCount

          public int getCookieCount()

    - #### setLimit

          public void setLimit​(int limit)

    - #### recycle

          public void recycle()