Interface ISpringWebFluxContext

  • All Superinterfaces:
    org.thymeleaf.context.IContext
    All Known Implementing Classes:
    SpringWebFluxContext, SpringWebFluxEngineContext, SpringWebFluxExpressionContext

    public interface ISpringWebFluxContext
    extends org.thymeleaf.context.IContext

    Specialization of the IContext interface to be implemented by contexts used for template processing in Spring WebFlux environments.

    Objects implementing this interface add to the usual IContext data 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.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.
      • Methods inherited from interface org.thymeleaf.context.IContext

        containsVariable, getLocale, getVariable, getVariableNames
    • Method Detail

      • getRequest

        org.springframework.http.server.reactive.ServerHttpRequest getRequest()

        Returns the ServerHttpRequest object associated with the template execution.

        Returns:
        the request object.
      • getResponse

        org.springframework.http.server.reactive.ServerHttpResponse getResponse()

        Returns the ServerHttpResponse object associated with the template execution.

        Returns:
        the response object.
      • getSession

        reactor.core.publisher.Mono<org.springframework.web.server.WebSession> getSession()

        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.

        Returns:
        the session object. Might be null if no session has been created.
      • getExchange

        org.springframework.web.server.ServerWebExchange getExchange()

        Returns the ServerWebExchange object associated with the template execution.

        Returns:
        the servlet context object.