Interface WebSessionStore

All Known Implementing Classes:
InMemoryWebSessionStore

public interface WebSessionStore
Strategy for WebSession persistence.
Since:
5.0
Author:
Rossen Stoyanchev, Rob Winch
  • Method Details

    • createWebSession

      reactor.core.publisher.Mono<WebSession> createWebSession()
      Create a new WebSession.

      Note that this does nothing more than create a new instance. The session can later be started explicitly via WebSession.start() or implicitly by adding attributes -- and then persisted via WebSession.save().

      Returns:
      the created session instance
    • retrieveSession

      reactor.core.publisher.Mono<WebSession> retrieveSession(String sessionId)
      Return the WebSession for the given id.

      Note: This method should perform an expiration check, and if it has expired remove the session and return empty. This method should also update the lastAccessTime of retrieved sessions.

      Parameters:
      sessionId - the session to load
      Returns:
      the session, or an empty Mono
    • removeSession

      reactor.core.publisher.Mono<Void> removeSession(String sessionId)
      Remove the WebSession for the specified id.
      Parameters:
      sessionId - the id of the session to remove
      Returns:
      a completion notification (success or error)
    • updateLastAccessTime

      reactor.core.publisher.Mono<WebSession> updateLastAccessTime(WebSession webSession)
      Update the last accessed timestamp to "now".
      Parameters:
      webSession - the session to update
      Returns:
      the session with the updated last access time