es.gob.fnmt.net

## Class CookiePolicyHandler

- java.lang.Object
- - es.gob.fnmt.net.CookiePolicyHandler

- All Implemented Interfaces:
    java.net.CookiePolicy

      public class CookiePolicyHandler
      extends java.lang.Object
      implements java.net.CookiePolicy

  Allow the management of site cookies.

- - ### Field Summary

    - ### Fields inherited from interface java.net.CookiePolicy

      `ACCEPT_ALL, ACCEPT_NONE, ACCEPT_ORIGINAL_SERVER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CookiePolicyHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deleteCookies(java.net.CookieStore cookieStore)` Delete all the cookies of the current site (See 'setSiteHandling()' method).
    `void` | `setSiteHandling(java.lang.String siteHandling)` Set the current HTTP site to be handled.
    `boolean` | `shouldAccept(java.net.URI uri, java.net.HttpCookie cookie)` Implementation of the java.net.CookiePolicy interface.

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

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

- - ### Constructor Detail

    - #### CookiePolicyHandler

          public CookiePolicyHandler()

  - ### Method Detail

    - #### deleteCookies

          public void deleteCookies(java.net.CookieStore cookieStore)

      Delete all the cookies of the current site (See 'setSiteHandling()' method).
      Parameters:
        `cookieStore` - The cookie store to update.

    - #### setSiteHandling

          public void setSiteHandling(java.lang.String siteHandling)

      Set the current HTTP site to be handled.
      Parameters:
        `siteHandling` - Identifier of the domain site.

    - #### shouldAccept

          public boolean shouldAccept(java.net.URI uri,
                                      java.net.HttpCookie cookie)

      Implementation of the java.net.CookiePolicy interface.
      Specified by:
        `shouldAccept` in interface `java.net.CookiePolicy`
      Parameters:
        `uri` - URI of the site that owns the cookie.
        `cookie` - Cookie received.
      Returns:
        true if the cookie is accepted, false otherwise.