Top Description Methods
org.springframework.web.server.session

public Interface WebSessionManager

Known Direct Implementers
org.springframework.web.server.session.DefaultWebSessionManager
Imports
reactor.core.publisher.Mono, org.springframework.web.server.ServerWebExchange, .WebSession

Main class for access to the WebSession for an HTTP request.
Author
Rossen Stoyanchev
Since
5.0
See Also
WebSessionIdResolver, WebSessionStore

Method Summary

Modifier and TypeMethod and Description
public Mono<WebSession>

Returns:

promise for the WebSession
getSession
(ServerWebExchange
the current exchange
exchange
)

Return the WebSession for the given exchange.

Method Detail

getSessionback to summary
public Mono<WebSession> getSession(ServerWebExchange exchange)

Return the WebSession for the given exchange. Always guaranteed to return an instance either matching to the session id requested by the client, or a new session either because the client did not specify one or because the underlying session expired.

Parameters
exchange:ServerWebExchange

the current exchange

Returns:Mono<WebSession>

promise for the WebSession