Interface Renderer


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

      • render

        java.io.InputStream render​(Plan plan,
                                   ResourceResolver resolver)
                            throws java.lang.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:
        java.lang.Exception - if the rendering unexpectedly fails