Class NgcRenderService


  • public final class NgcRenderService
    extends java.lang.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 Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static NgcRenderService getInstance()  
      java.util.List<com.saperion.connector.renditions.Rendition> renderStream​(com.saperion.common.io.InputStreamDescriptor stream, com.saperion.connector.formats.TargetFormat targetFormat)
      Renders the provided stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

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

        public java.util.List<com.saperion.connector.renditions.Rendition> renderStream​(com.saperion.common.io.InputStreamDescriptor stream,
                                                                                        com.saperion.connector.formats.TargetFormat targetFormat)
                                                                                 throws java.util.concurrent.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:
        java.util.concurrent.TimeoutException - when rendering took longer than the timeout
        com.saperion.connector.renditions.exceptions.RenderingException - when rendering failed because of an error