Package nl.nn.adapterframework.util.flow
Class GraphvizJsFlowGenerator
- java.lang.Object
-
- nl.nn.adapterframework.util.flow.DotFlowGenerator
-
- nl.nn.adapterframework.util.flow.GraphvizJsFlowGenerator
-
- All Implemented Interfaces:
IFlowGenerator
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class GraphvizJsFlowGenerator extends DotFlowGenerator
Initialized through Spring. Uses @{link GraphvizEngine} to get an available JavaScriptEngine to generate the Flow images with.
-
-
Field Summary
-
Fields inherited from class nl.nn.adapterframework.util.flow.DotFlowGenerator
log
-
-
Constructor Summary
Constructors Constructor Description GraphvizJsFlowGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
generateFlow(String xml, OutputStream outputStream)
String
getFileExtension()
GraphvizEngine
getGraphvizEngine()
The IFlowGenerator is wrapped in a SoftReference, wrapped in a ThreadLocal.org.springframework.http.MediaType
getMediaType()
-
Methods inherited from class nl.nn.adapterframework.util.flow.DotFlowGenerator
afterPropertiesSet, generateDot
-
-
-
-
Method Detail
-
getGraphvizEngine
public GraphvizEngine getGraphvizEngine()
The IFlowGenerator is wrapped in a SoftReference, wrapped in a ThreadLocal. When the thread is cleaned up, it will remove the instance. Or when the GC is running out of heapspace, it will remove the IFlowGenerator. This method makes sure, as long as the IFlowGenerator bean can initialize, always a valid instance is returned.
-
generateFlow
public void generateFlow(String xml, OutputStream outputStream) throws FlowGenerationException
- Specified by:
generateFlow
in interfaceIFlowGenerator
- Overrides:
generateFlow
in classDotFlowGenerator
- Throws:
FlowGenerationException
-
getFileExtension
public String getFileExtension()
- Specified by:
getFileExtension
in interfaceIFlowGenerator
- Overrides:
getFileExtension
in classDotFlowGenerator
-
getMediaType
public org.springframework.http.MediaType getMediaType()
- Specified by:
getMediaType
in interfaceIFlowGenerator
- Overrides:
getMediaType
in classDotFlowGenerator
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Overrides:
destroy
in classDotFlowGenerator
-
-