Interface AsyncSessionManager


  • public interface AsyncSessionManager
    A session manager is responsible to create/save a new type of Session.
    • Method Detail

      • loadAsync

        Promise<Session,​NeverThrowsException> loadAsync​(Request request)
        Loads a new Session for the given Request. The implementations are free to keep a reference to the Request.

        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.