Interface IConverter


  • public interface IConverter
    A converter that allows the conversion of documents. A converter might have an active life cycle such that its shutDown() method must be called when a converter is not longer used. After a converter is shut down, it cannot be reused but needs to be recreated.
    • Field Detail

      • JOB_PRIORITY_LOW

        static final int JOB_PRIORITY_LOW
        A conversion of low priority. Recommended for longer lasting batch conversion such that a converter does not block until the batch conversion terminates.
        See Also:
        Constant Field Values
      • JOB_PRIORITY_NORMAL

        static final int JOB_PRIORITY_NORMAL
        A conversion of normal priority. Recommended for non-urgent conversions that are not requested just-in-time.
        See Also:
        Constant Field Values
      • JOB_PRIORITY_HIGH

        static final int JOB_PRIORITY_HIGH
        A conversion of high priority. Recommended for just-in-time conversions.
        See Also:
        Constant Field Values
    • Method Detail

      • convert

        IConversionJobWithSourceUnspecified convert​(InputStream source)
        Converts a source that is represented as a InputStream. The input stream will be closed after the conversion is complete.
        Parameters:
        source - The conversion input as an input stream.
        Returns:
        The current conversion specification.
      • convert

        IConversionJobWithSourceUnspecified convert​(IInputStreamSource source)
        Invokes a callback for the dynamic generation of a input stream source which is additionally informed about the consumption of this source.
        Parameters:
        source - The input stream source generator.
        Returns:
        The current conversion specification.
      • convert

        IConversionJobWithSourceUnspecified convert​(File source)
        Converts a source file that is stored on the local file system.
        Parameters:
        source - The conversion input as a file.
        Returns:
        The current conversion specification.
      • convert

        IConversionJobWithSourceUnspecified convert​(IFileSource source)
        Invokes a callback for the dynamic generation of a file source which is additionally informed about the consumption of a source.
        Parameters:
        source - The file source generator.
        Returns:
        The current conversion specification.
      • getSupportedConversions

        Map<DocumentType,​Set<DocumentType>> getSupportedConversions()
        Returns a mapping of all conversions that are supported by the backing conversion engine.
        Returns:
        A map of all possible conversions with the key describing the input types and the set describing the formats that these input types can be converted into.
      • isOperational

        boolean isOperational()
        Checks if this converter is currently operational, i.e. it can convert documents and is not shut down.
        Returns:
        true if the converter is operational.
      • shutDown

        void shutDown()
        Shuts down this converter gracefully. The converter does no longer accept new conversion requests but awaits running conversions to complete for a given period of time.
      • kill

        void kill()
        Shuts down this converter immediately. All running conversions are aborted.