Interface ISpringWebFluxContext
-
- All Superinterfaces:
org.thymeleaf.context.IContext
- All Known Implementing Classes:
SpringWebFluxContext,SpringWebFluxEngineContext,SpringWebFluxExpressionContext
public interface ISpringWebFluxContext extends org.thymeleaf.context.IContextSpecialization of the
IContextinterface to be implemented by contexts used for template processing in Spring WebFlux environments.Objects implementing this interface add to the usual
IContextdata the Spring WebFlux-related artifacts needed to perform functions such as URL rewriting or request/session access.A basic implementation of this interface is provided by
SpringWebFluxExpressionContext, but there is normally no reason why users should use this interface (or its implementations) directly.- Since:
- 3.0.3
- Author:
- Daniel Fernández
- See Also:
SpringWebFluxExpressionContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.springframework.web.server.ServerWebExchangegetExchange()Returns theServerWebExchangeobject associated with the template execution.org.springframework.http.server.reactive.ServerHttpRequestgetRequest()Returns theServerHttpRequestobject associated with the template execution.org.springframework.http.server.reactive.ServerHttpResponsegetResponse()Returns theServerHttpResponseobject associated with the template execution.reactor.core.publisher.Mono<org.springframework.web.server.WebSession>getSession()Returns theWebSessionobject associated with the template execution.
-
-
-
Method Detail
-
getRequest
org.springframework.http.server.reactive.ServerHttpRequest getRequest()
Returns the
ServerHttpRequestobject associated with the template execution.- Returns:
- the request object.
-
getResponse
org.springframework.http.server.reactive.ServerHttpResponse getResponse()
Returns the
ServerHttpResponseobject associated with the template execution.- Returns:
- the response object.
-
getSession
reactor.core.publisher.Mono<org.springframework.web.server.WebSession> getSession()
Returns the
WebSessionobject associated with the template execution.The returned
Monowill always return an instance, either matching the client's session id or a new session. Note that calling this method does not create the session object itself.- Returns:
- the session object. Might be null if no session has been created.
-
getExchange
org.springframework.web.server.ServerWebExchange getExchange()
Returns the
ServerWebExchangeobject associated with the template execution.- Returns:
- the servlet context object.
-
-