public class CookieManager extends Object
| Constructor and Description |
|---|
CookieManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
add401(String id,
String value)
Adds a Cookie for a special session from a response with
response-code 401 to the cookie-pool for sending it back
to the browser / client
|
void |
clear401(String id)
Clear the 401 cookie-pool of a session
|
HashMap |
get401(String id)
Get the HashMap containing all cookies of a session to be sent to the browser / client
|
String |
getCookie(String id)
Get a String containing all cookies of a specified session-id
saved in that session seperated by '; ' to be sent back to
the Online-Application
|
Cookie |
getCookieWithID(String id)
Get a Cookie-Object for a specified session-id
|
static CookieManager |
getInstance()
Create a singleton of the CookieManager
|
void |
saveCookie(String id,
String cookie_string)
Save a cookie to a specified session-id
|
void |
saveOldCookies(String id,
String cookie_string)
Method saveOldCookies.
|
public static CookieManager getInstance()
public void saveCookie(String id, String cookie_string)
id - The session idcookie_string - The complete 'Set-Cookie' String from the OnlineApplicationpublic void saveOldCookies(String id, String cookie_string)
id - cookie_string - public Cookie getCookieWithID(String id)
id - The session idpublic String getCookie(String id)
id - the session-idpublic void add401(String id, String value)
id - The session-idvalue - The complete 'Set-Cookie' - Stringpublic void clear401(String id)
id - the session-idCopyright © 2016. All Rights Reserved.