Class CookieBasedSessionManager
java.lang.Object
org.forgerock.openig.session.cookie.CookieBasedSessionManager
- All Implemented Interfaces:
AsyncSessionManager
An implementation of
AsyncSessionManager
storing sessions in memory.-
Constructor Summary
ConstructorDescriptionCookieBasedSessionManager
(org.forgerock.openig.http.protocol.CookieBuilder cookieBuilder, LocalSessionStore sessionStore) Create a newCookieBasedSessionManager
instance. -
Method Summary
-
Constructor Details
-
CookieBasedSessionManager
public CookieBasedSessionManager(org.forgerock.openig.http.protocol.CookieBuilder cookieBuilder, LocalSessionStore sessionStore) Create a newCookieBasedSessionManager
instance.- Parameters:
cookieBuilder
- the cookie builder to use to create the session cookie.sessionStore
- the session store to use to store the session content.
-
-
Method Details
-
loadAsync
Description copied from interface:AsyncSessionManager
Loads a new Session for the givenRequest
. The implementations are free to keep a reference to theRequest
.The session object is scoped by the
Request
's own lifecycle.- Specified by:
loadAsync
in interfaceAsyncSessionManager
- Parameters:
request
- Request to create a session for.- Returns:
- a new Session promise (never null).
-
saveAsync
Description copied from interface:AsyncSessionManager
Saves the session into the provided response.- Specified by:
saveAsync
in interfaceAsyncSessionManager
- Parameters:
session
- The session to save.response
- The response to save the session to.- Returns:
- a promise completed with null if save operation succeeded, otherwise failed with an
IOException
.
-