Class ThymeleafReactiveView

Object
org.springframework.web.reactive.result.view.AbstractView
org.thymeleaf.spring6.view.reactive.ThymeleafReactiveView
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.context.ApplicationContextAware, org.springframework.web.reactive.result.view.View

public class ThymeleafReactiveView extends org.springframework.web.reactive.result.view.AbstractView implements org.springframework.beans.factory.BeanNameAware

Base implementation of the Spring WebFlux View interface.

Views represent a template being executed, after being resolved (and instantiated) by a ViewResolver.

This is the default view implementation resolved by ThymeleafReactiveViewResolver.

This view needs a ISpringWebFluxTemplateEngine for execution, and it will call its ISpringWebFluxTemplateEngine.processStream(String, Set, IContext, DataBufferFactory, MediaType, Charset, int) method to create the reactive data streams to be used for processing the template. See the documentation of this class to know more about the different operation modes available.

Since:
3.0.3
Author:
Daniel Fernández
See Also:
  • Field Details

    • logger

      protected static final org.slf4j.Logger logger
    • DEFAULT_RESPONSE_CHUNK_SIZE_BYTES

      public static final int DEFAULT_RESPONSE_CHUNK_SIZE_BYTES
      By default, no max response chunk size is set. Value = Integer.MAX_VALUE
      See Also:
  • Constructor Details

    • ThymeleafReactiveView

      public ThymeleafReactiveView()
  • Method Details

    • getMarkupSelector

      public String getMarkupSelector()
    • setMarkupSelector

      public void setMarkupSelector(String markupSelector)
    • setDefaultCharset

      public void setDefaultCharset(Charset defaultCharset)
      Overrides:
      setDefaultCharset in class org.springframework.web.reactive.result.view.AbstractView
    • setSupportedMediaTypes

      public void setSupportedMediaTypes(List<org.springframework.http.MediaType> supportedMediaTypes)
      Overrides:
      setSupportedMediaTypes in class org.springframework.web.reactive.result.view.AbstractView
    • getBeanName

      public String getBeanName()
      Overrides:
      getBeanName in class org.springframework.web.reactive.result.view.AbstractView
    • setBeanName

      public void setBeanName(String beanName)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
      Overrides:
      setBeanName in class org.springframework.web.reactive.result.view.AbstractView
    • getTemplateName

      public String getTemplateName()
    • setTemplateName

      public void setTemplateName(String templateName)
    • getLocale

      protected Locale getLocale()
    • setLocale

      protected void setLocale(Locale locale)
    • getResponseMaxChunkSizeBytes

      public int getResponseMaxChunkSizeBytes()
    • setResponseMaxChunkSizeBytes

      public void setResponseMaxChunkSizeBytes(int responseMaxBufferSizeBytes)
    • getTemplateEngine

      protected ISpringWebFluxTemplateEngine getTemplateEngine()
    • setTemplateEngine

      protected void setTemplateEngine(ISpringWebFluxTemplateEngine templateEngine)
    • getStaticVariables

      public Map<String,Object> getStaticVariables()
    • addStaticVariable

      public void addStaticVariable(String name, Object value)
    • setStaticVariables

      public void setStaticVariables(Map<String,?> variables)
    • render

      public reactor.core.publisher.Mono<Void> render(Map<String,?> model, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange)
      Specified by:
      render in interface org.springframework.web.reactive.result.view.View
      Overrides:
      render in class org.springframework.web.reactive.result.view.AbstractView
    • renderInternal

      protected reactor.core.publisher.Mono<Void> renderInternal(Map<String,Object> renderAttributes, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange)
      Specified by:
      renderInternal in class org.springframework.web.reactive.result.view.AbstractView
    • renderFragmentInternal

      protected reactor.core.publisher.Mono<Void> renderFragmentInternal(Set<String> markupSelectorsToRender, Map<String,Object> renderAttributes, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange)