Class NgcRenderService

java.lang.Object
com.saperion.ngc.rendering.NgcRenderService

public final class NgcRenderService extends Object
A service class that can be used to render a stream. The service uses an ExecutorService and a RenderEngine to perform the rendering. The configuration for the executor service and the engine is read from:
  • saperion.properties (engine class name, thread count)
  • webclient.properties (render engine options)
  • Method Details

    • getInstance

      public static NgcRenderService getInstance()
      Returns:
      singleton instance of the render-service
    • renderStream

      public List<com.saperion.connector.renditions.Rendition> renderStream(com.saperion.common.io.InputStreamDescriptor stream, com.saperion.connector.formats.TargetFormat targetFormat) throws TimeoutException, com.saperion.connector.renditions.exceptions.RenderingException
      Renders the provided stream.
      Parameters:
      stream - stream to render
      targetFormat - format to render to
      Returns:
      list of renditions
      Throws:
      TimeoutException - when rendering took longer than the timeout
      com.saperion.connector.renditions.exceptions.RenderingException - when rendering failed because of an error