Interface Renderer


public interface Renderer
SPI interface for providing implementations for the Gfx API.
  • Method Summary

    Modifier and Type
    Method
    Description
    render(Plan plan, ResourceResolver resolver)
    Renders the given plan and returns a binary file stream, typically an image file format, depending on the plan.
  • Method Details

    • render

      InputStream render(Plan plan, ResourceResolver resolver) throws Exception
      Renders the given plan and returns a binary file stream, typically an image file format, depending on the plan.

      Validation and errors:

      • If the plan cannot be rendered (e.g. unsupported operations or unsupported src references), return null. There should be a validation check at the beginning.
      • If the plan can be rendered, but there is an exception, it should be thrown.
      Parameters:
      plan - describes the rendering operations
      resolver - a resource resolver to access files referenced in the plan
      Returns:
      A binary file stream, typically an image file format. If the plan cannot be rendered, return null.
      Throws:
      Exception - if the rendering unexpectedly fails