Class TurboStream

java.lang.Object
io.micronaut.views.turbo.TurboStream
All Implemented Interfaces:
Renderable

public final class TurboStream extends Object implements Renderable
Turbo Stream. Streams.
Since:
3.3.0
Author:
Sergio del Amo
  • Method Details

    • getAction

      @NonNull public @NonNull TurboStreamAction getAction()
      Returns:
      Turbo Stream Action.
    • getTargetDomId

      @NonNull public @NonNull Optional<String> getTargetDomId()
      Returns:
      Target DOM ID.
    • getTargetCssQuerySelector

      @NonNull public @NonNull Optional<String> getTargetCssQuerySelector()
      Returns:
      Target CSS Selector
    • getRequestId

      public Optional<String> getRequestId()
      Returns:
      request-id attribute, only relevant when action=refresh
    • getChildrenOnly

      public boolean getChildrenOnly()
      Returns:
      Morph only the children of the element designated by the target dom id.
    • getTemplate

      @NonNull public @NonNull Optional<Object> getTemplate()
      Returns:
      Template.
    • builder

      @NonNull public static @NonNull TurboStream.Builder builder()
      Returns:
      Creates a TurboStream Builder.
    • render

      @NonNull public @NonNull Optional<io.micronaut.core.io.Writable> render()
      Specified by:
      render in interface Renderable
      Returns:
      Renders a TurboStream as a Writable