class InMemoryCookieStore extends Object implements CookieStore
Constructor and Description |
---|
InMemoryCookieStore()
The default ctor
|
Modifier and Type | Method and Description |
---|---|
void |
add(URI uri,
HttpCookie cookie)
Add one cookie into cookie store.
|
List<HttpCookie> |
get(URI uri)
Get all cookies, which:
1) given uri domain-matches with, or, associated with
given uri when added to the cookie store.
|
List<HttpCookie> |
getCookies()
Get all cookies in cookie store, except those have expired
|
List<URI> |
getURIs()
Get all URIs, which are associated with at least one cookie
of this cookie store.
|
boolean |
remove(URI uri,
HttpCookie ck)
Remove a cookie from store
|
boolean |
removeAll()
Remove all cookies in this cookie store.
|
public void add(URI uri, HttpCookie cookie)
add
in interface CookieStore
uri
- the uri this cookie associated with.
if null, this cookie will not be associated
with an URIcookie
- the cookie to storeCookieStore.get(java.net.URI)
public List<HttpCookie> get(URI uri)
get
in interface CookieStore
CookieStore.add(java.net.URI, com.sun.xml.ws.transport.http.client.HttpCookie)
public List<HttpCookie> getCookies()
getCookies
in interface CookieStore
public List<URI> getURIs()
getURIs
in interface CookieStore
public boolean remove(URI uri, HttpCookie ck)
remove
in interface CookieStore
uri
- the uri this cookie associated with.
if null, the cookie to be removed is not associated
with an URI when added; if not null, the cookie
to be removed is associated with the given URI when added.ck
- the cookie to removepublic boolean removeAll()
removeAll
in interface CookieStore
Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.