public class BdbCookieStore extends AbstractCookieStore implements FetchHTTPCookieStore, org.apache.http.client.CookieStore
AbstractCookieStore.sortableKey(Cookie)
, so they are grouped together by domain.
cookieStoreFor(String)
returns a facade whose
CookieStore.getCookies()
returns a list of cookies limited to
the supplied host and parent domains, if applicable.Modifier and Type | Class and Description |
---|---|
static class |
BdbCookieStore.RestrictedCollectionWrappedList<T>
A
List implementation that wraps a Collection . |
AbstractCookieStore.LimitedCookieStoreFacade
Modifier and Type | Field and Description |
---|---|
protected BdbModule |
bdb |
static String |
COOKIEDB_NAME |
protected boolean |
isCheckpointRecovery
are we a checkpoint recovery? (in which case, reuse stored cookie data?)
|
cookieComparator, cookiesLoadFile, cookiesSaveFile, isRunning, logger, MAX_COOKIES_FOR_DOMAIN
Constructor and Description |
---|
BdbCookieStore() |
Modifier and Type | Method and Description |
---|---|
void |
addCookieImpl(org.apache.http.cookie.Cookie cookie) |
void |
clear() |
boolean |
clearExpired(Date date) |
org.apache.http.client.CookieStore |
cookieStoreFor(String host)
Returns a
LimitedCookieStoreFacade whose
LimitedCookieStoreFacade#getCookies() method returns only cookies
from host and its parent domains, if applicable. |
void |
doCheckpoint(Checkpoint checkpointInProgress) |
void |
finishCheckpoint(Checkpoint checkpointInProgress) |
List<org.apache.http.cookie.Cookie> |
getCookies() |
protected Collection<org.apache.http.cookie.Cookie> |
hostSubset(String host) |
void |
prepare() |
void |
setBdbModule(BdbModule bdb) |
void |
setRecoveryCheckpoint(Checkpoint recoveryCheckpoint) |
void |
startCheckpoint(Checkpoint checkpointInProgress) |
addCookie, cookieStoreFor, getCookiesLoadFile, getCookiesSaveFile, isCookieCountMaxedForDomain, isRunning, loadCookies, loadCookies, normalizeHost, readCookies, saveCookies, saveCookies, setCookiesLoadFile, setCookiesSaveFile, sortableKey, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cookieStoreFor
protected BdbModule bdb
public static String COOKIEDB_NAME
protected boolean isCheckpointRecovery
public void setBdbModule(BdbModule bdb)
public void prepare()
prepare
in class AbstractCookieStore
public void addCookieImpl(org.apache.http.cookie.Cookie cookie)
addCookieImpl
in class AbstractCookieStore
protected Collection<org.apache.http.cookie.Cookie> hostSubset(String host)
public org.apache.http.client.CookieStore cookieStoreFor(String host)
LimitedCookieStoreFacade
whose
LimitedCookieStoreFacade#getCookies()
method returns only cookies
from host
and its parent domains, if applicable.cookieStoreFor
in interface FetchHTTPCookieStore
public void startCheckpoint(Checkpoint checkpointInProgress)
startCheckpoint
in interface Checkpointable
public void doCheckpoint(Checkpoint checkpointInProgress) throws IOException
doCheckpoint
in interface Checkpointable
IOException
public void finishCheckpoint(Checkpoint checkpointInProgress)
finishCheckpoint
in interface Checkpointable
public void setRecoveryCheckpoint(Checkpoint recoveryCheckpoint)
setRecoveryCheckpoint
in interface Checkpointable
public void clear()
clear
in interface org.apache.http.client.CookieStore
clear
in class AbstractCookieStore
public List<org.apache.http.cookie.Cookie> getCookies()
getCookies
in interface org.apache.http.client.CookieStore
public boolean clearExpired(Date date)
clearExpired
in interface org.apache.http.client.CookieStore
Copyright © 2003–2019 Internet Archive. All rights reserved.