Class DefaultTurboStreamRenderer

java.lang.Object
io.micronaut.views.turbo.DefaultTurboStreamRenderer
All Implemented Interfaces:
TurboStreamRenderer

@Singleton @Requires(classes=io.micronaut.http.HttpRequest.class) public class DefaultTurboStreamRenderer extends Object implements TurboStreamRenderer
DefaultImplementation of TurboStreamRenderer.
Since:
3.3.0
Author:
Sergio del Amo
  • Field Details

  • Constructor Details

    • DefaultTurboStreamRenderer

      public DefaultTurboStreamRenderer(ViewsRendererLocator viewsRendererLocator)
  • Method Details

    • render

      @NonNull public @NonNull Optional<io.micronaut.core.io.Writable> render(@NonNull TurboStream.Builder builder, @Nullable @Nullable io.micronaut.http.HttpRequest<?> request)
      Specified by:
      render in interface TurboStreamRenderer
      Parameters:
      builder - Turbo Stream builder
      request - HTTP Request
      Returns:
      A Writable