Class GraphvizEngine
java.lang.Object
org.frankframework.util.flow.graphviz.GraphvizEngine
JavaScript engine wrapper for VizJs flow diagrams
- Author:
- Niels Meijer
-
Constructor Summary
ConstructorDescriptionCreate a new GraphvizEngine instance.GraphvizEngine
(String graphvizVersion) Create a new GraphvizEngine instance -
Method Summary
-
Constructor Details
-
GraphvizEngine
Create a new GraphvizEngine instance. Using version 2.0.0- Throws:
IOException
-
GraphvizEngine
Create a new GraphvizEngine instance- Parameters:
graphvizVersion
- version of the VisJs engine to initiate- Throws:
IOException
-
-
Method Details
-
execute
Execute GraphViz with default options (Format.SVG
)- Parameters:
src
- dot file- Returns:
Format.SVG
string- Throws:
IOException
- when VizJs files can't be found on the classpathFlowGenerationException
- when a JavaScript engine error occurs
-
execute
Execute GraphViz- Parameters:
src
- dot fileoptions
- seeOptions
- Returns:
- string in specified
Format
- Throws:
IOException
- when VizJs files can't be found on the classpathFlowGenerationException
- when a JavaScript engine error occurs
-
close
public void close()Shuts down the GraphvizEngine instance properly. TheGraphvizJsFlowGenerator
uses a ThreadLocal+SoftReference map to cache theGraphvisEngines
. This method ensures that the used Javascript engine is destroyed properly.
-