Interface ModelAndViewRenderer<T,R>

Type Parameters:
T - The model type
R - The request type
All Known Implementing Classes:
DefaultModelAndViewRenderer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @DefaultImplementation(DefaultModelAndViewRenderer.class) public interface ModelAndViewRenderer<T,R>
Renders a ModelAndView.
Since:
5.2.0
Author:
Tim Yates
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull Optional<io.micronaut.core.io.Writable>
    render(@NonNull ModelAndView<T> modelAndView, R request, @NonNull String mediaType)
    Renders a ModelAndView into a Writable.
  • Method Details

    • render

      @NonNull @NonNull Optional<io.micronaut.core.io.Writable> render(@NonNull @NonNull ModelAndView<T> modelAndView, @Nullable R request, @NonNull @NonNull String mediaType)
      Renders a ModelAndView into a Writable.
      Parameters:
      modelAndView - Model And View
      request - Request
      mediaType - Media Type
      Returns:
      a ModelAndView into a Writable