Class CustomCookieStore

  • All Implemented Interfaces:
    java.net.CookieStore

    public class CustomCookieStore
    extends java.lang.Object
    implements java.net.CookieStore
    https://www.spigotmc.org/threads/javafx-webview-cookies.232902/
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomCookieStore()
      The default ctor
    • Method Summary

      Modifier and Type Method Description
      void add​(java.net.URI uri, java.net.HttpCookie cookie)
      Add one cookie into cookie store.
      java.util.List<java.net.HttpCookie> get​(java.net.URI uri)
      Get all cookies, which: 1) given uri domain-matches with, or, associated with given uri when added to the cookie store. 3) not expired.
      java.util.List<java.net.HttpCookie> getCookies()
      Get all cookies in cookie store, except those have expired
      java.util.List<java.net.URI> getURIs()
      Get all URIs, which are associated with at least one cookie of this cookie store.
      boolean remove​(java.net.URI uri, java.net.HttpCookie ck)
      Remove a cookie from store
      boolean removeAll()
      Remove all cookies in this cookie store.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CustomCookieStore

        public CustomCookieStore()
        The default ctor
    • Method Detail

      • add

        public void add​(java.net.URI uri,
                        java.net.HttpCookie cookie)
        Add one cookie into cookie store.
        Specified by:
        add in interface java.net.CookieStore
      • get

        public java.util.List<java.net.HttpCookie> get​(java.net.URI uri)
        Get all cookies, which: 1) given uri domain-matches with, or, associated with given uri when added to the cookie store. 3) not expired. See RFC 2965 sec. 3.3.4 for more detail.
        Specified by:
        get in interface java.net.CookieStore
      • getCookies

        public java.util.List<java.net.HttpCookie> getCookies()
        Get all cookies in cookie store, except those have expired
        Specified by:
        getCookies in interface java.net.CookieStore
      • getURIs

        public java.util.List<java.net.URI> getURIs()
        Get all URIs, which are associated with at least one cookie of this cookie store.
        Specified by:
        getURIs in interface java.net.CookieStore
      • remove

        public boolean remove​(java.net.URI uri,
                              java.net.HttpCookie ck)
        Remove a cookie from store
        Specified by:
        remove in interface java.net.CookieStore
      • removeAll

        public boolean removeAll()
        Remove all cookies in this cookie store.
        Specified by:
        removeAll in interface java.net.CookieStore