Interface CookieJar


public interface CookieJar
A Cookie container for a client.
  • Method Summary

    Modifier and Type
    Method
    Description
    get​(URI uri)
    Returns the unexpired Cookies for the specified URI.
    default void
    set​(URI uri, Iterable<? extends Cookie> cookies)
    Stores the specified Cookies for the URI.
    void
    set​(URI uri, Iterable<? extends Cookie> cookies, long createdTimeMillis)
    Stores the specified Cookies for the URI given the creation time.
    default CookieState
    state​(Cookie cookie)
    Determines the state of a cookie.
    state​(Cookie cookie, long currentTimeMillis)
    Determines the state of a cookie given the current time.
  • Method Details

    • get

      Cookies get(URI uri)
      Returns the unexpired Cookies for the specified URI.
    • set

      default void set(URI uri, Iterable<? extends Cookie> cookies)
      Stores the specified Cookies for the URI. This method is a shortcut for set(uri, cookies, System.currentTimeMillis()).
    • set

      void set(URI uri, Iterable<? extends Cookie> cookies, long createdTimeMillis)
      Stores the specified Cookies for the URI given the creation time.
    • state

      default CookieState state(Cookie cookie)
      Determines the state of a cookie. This method is a shortcut for state(cookie, System.currentTimeMillis()).
    • state

      CookieState state(Cookie cookie, long currentTimeMillis)
      Determines the state of a cookie given the current time.