public class SpringWebReactiveExpressionContext extends org.thymeleaf.context.AbstractExpressionContext implements ISpringWebReactiveContext
Basic Spring Web Reactive-oriented implementation of the IExpressionContext and
ISpringWebReactiveContext interfaces.
This class is not thread-safe, and should not be shared across executions of templates.
| Constructor and Description |
|---|
SpringWebReactiveExpressionContext(org.thymeleaf.IEngineConfiguration configuration,
org.springframework.web.server.ServerWebExchange exchange) |
SpringWebReactiveExpressionContext(org.thymeleaf.IEngineConfiguration configuration,
org.springframework.web.server.ServerWebExchange exchange,
Locale locale) |
SpringWebReactiveExpressionContext(org.thymeleaf.IEngineConfiguration configuration,
org.springframework.web.server.ServerWebExchange exchange,
Locale locale,
Map<String,Object> variables) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.web.server.ServerWebExchange |
getExchange()
Returns the
ServerWebExchange object associated with the template execution. |
org.springframework.http.server.reactive.ServerHttpRequest |
getRequest()
Returns the
ServerHttpRequest object associated with the template execution. |
org.springframework.http.server.reactive.ServerHttpResponse |
getResponse()
Returns the
ServerHttpResponse object associated with the template execution. |
reactor.core.publisher.Mono<org.springframework.web.server.WebSession> |
getSession()
Returns the
WebSession object associated with the template execution. |
getConfiguration, getExpressionObjectsclearVariables, containsVariable, getLocale, getVariable, getVariableNames, removeVariable, setLocale, setVariable, setVariablespublic SpringWebReactiveExpressionContext(org.thymeleaf.IEngineConfiguration configuration,
org.springframework.web.server.ServerWebExchange exchange)
public SpringWebReactiveExpressionContext(org.thymeleaf.IEngineConfiguration configuration,
org.springframework.web.server.ServerWebExchange exchange,
Locale locale)
public org.springframework.http.server.reactive.ServerHttpRequest getRequest()
ISpringWebReactiveContext
Returns the ServerHttpRequest object associated with the template execution.
getRequest in interface ISpringWebReactiveContextpublic reactor.core.publisher.Mono<org.springframework.web.server.WebSession> getSession()
ISpringWebReactiveContext
Returns the WebSession object associated with the template execution.
The returned Mono will 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.
getSession in interface ISpringWebReactiveContextpublic org.springframework.http.server.reactive.ServerHttpResponse getResponse()
ISpringWebReactiveContext
Returns the ServerHttpResponse object associated with the template execution.
getResponse in interface ISpringWebReactiveContextpublic org.springframework.web.server.ServerWebExchange getExchange()
ISpringWebReactiveContext
Returns the ServerWebExchange object associated with the template execution.
getExchange in interface ISpringWebReactiveContextCopyright © 2017 The THYMELEAF team. All rights reserved.