Package org.forgerock.http.session
Interface AsyncSessionManager
-
- All Known Implementing Classes:
CookieBasedSessionManager
public interface AsyncSessionManager
A session manager is responsible to create/save a new type ofSession
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Promise<Session,NeverThrowsException>
loadAsync(Request request)
Loads a new Session for the givenRequest
.Promise<Void,IOException>
saveAsync(Session session, Response response)
Saves the session into the provided response.
-
-
-
Method Detail
-
loadAsync
Promise<Session,NeverThrowsException> loadAsync(Request request)
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.- Parameters:
request
- Request to create a session for.- Returns:
- a new Session promise (never null).
-
saveAsync
Promise<Void,IOException> saveAsync(Session session, Response response)
Saves the session into the provided response.- 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
.
-
-