Class HttpCookieStore.Empty

java.lang.Object
org.eclipse.jetty.http.HttpCookieStore.Empty
All Implemented Interfaces:
HttpCookieStore
Enclosing interface:
HttpCookieStore

public static class HttpCookieStore.Empty extends Object implements HttpCookieStore

An implementation of HttpCookieStore that does not store any cookie.

  • Constructor Details

    • Empty

      public Empty()
  • Method Details

    • add

      public boolean add(URI uri, HttpCookie cookie)
      Description copied from interface: HttpCookieStore

      Adds a cookie to this store, if possible.

      The cookie may not be added for various reasons; for example, it may be already expired, or its domain attribute does not match that of the URI, etc.

      The cookie is associated with the given URI, so that a call to HttpCookieStore.match(URI) returns the cookie only if the URIs match.

      Specified by:
      add in interface HttpCookieStore
      Parameters:
      uri - the URI associated with the cookie
      cookie - the cookie to add
      Returns:
      whether the cookie has been added
    • all

      public List<HttpCookie> all()
      Specified by:
      all in interface HttpCookieStore
      Returns:
      all the cookies
    • match

      public List<HttpCookie> match(URI uri)
      Description copied from interface: HttpCookieStore

      Returns the cookies that match the given URI.

      Specified by:
      match in interface HttpCookieStore
      Parameters:
      uri - the URI to match against
      Returns:
      a list of cookies that match the given URI
    • remove

      public boolean remove(URI uri, HttpCookie cookie)
      Description copied from interface: HttpCookieStore

      Removes the cookie associated with the given URI.

      Specified by:
      remove in interface HttpCookieStore
      Parameters:
      uri - the URI associated with the cookie to remove
      cookie - the cookie to remove
      Returns:
      whether the cookie has been removed
    • clear

      public boolean clear()
      Description copied from interface: HttpCookieStore

      Removes all the cookies from this store.

      Specified by:
      clear in interface HttpCookieStore
      Returns:
      whether the store modified by this call