Class ClientCookieStore
java.lang.Object
com.sun.enterprise.admin.cli.remote.ClientCookieStore
- All Implemented Interfaces:
CookieStore
This is a derivation of the CookieStore which provides load and store
methods which allows the cookies to be stored to and retreived from
a file.
This CookieStore is specialized for maintaining session cookies for
session routing and therefor has side effects that a generalized
cookie store would not have. For example when cookies are stored
the URI associated with the cookie is not maintained.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(URI uri, HttpCookie cookie) getURIs()voidload()Load the persisted cookies into the CookieStore.booleanremove(URI uri, HttpCookie cookie) booleanvoidstore()Store the cookies in the CookieStore to the provided location.booleanUpdates the last modification time of the cache file if it is more than CACHE_WRITE_DELTA old.
-
Constructor Details
-
ClientCookieStore
-
-
Method Details
-
add
- Specified by:
addin interfaceCookieStore
-
get
- Specified by:
getin interfaceCookieStore
-
getCookies
- Specified by:
getCookiesin interfaceCookieStore
-
getURIs
- Specified by:
getURIsin interfaceCookieStore
-
remove
- Specified by:
removein interfaceCookieStore
-
removeAll
public boolean removeAll()- Specified by:
removeAllin interfaceCookieStore
-
getStaticURI
-
load
Load the persisted cookies into the CookieStore. The store has this schema: COOKIE1=xxx; ... COOKIE2=yyy; ...- Throws:
IOException
-
store
Store the cookies in the CookieStore to the provided location. This method will overwrite the contents of the target file.- Throws:
IOException
-
touchStore
public boolean touchStore()Updates the last modification time of the cache file if it is more than CACHE_WRITE_DELTA old. The file's modification time is use as the creation time for any cookies stored in the cache. We use this time to determine when to expire cookies. As an optimization we don't update the file if a reponse has the *same* set-cookies as what's in the file and the file is less than CACHE_WRITE_DELTA old.
-