public class TopologicallySortedDependecyGraph extends Object implements NodeRegistry
Constructor and Description |
---|
TopologicallySortedDependecyGraph(DeclarativeNodeConiguration declarativeNodeConiguration) |
TopologicallySortedDependecyGraph(List nodes) |
TopologicallySortedDependecyGraph(List nodes,
Map<Object,String> publicNodes) |
TopologicallySortedDependecyGraph(List nodes,
Map<Object,String> publicNodes,
DeclarativeNodeConiguration declarativeNodeConiguration,
GenerationContext context,
Map<String,com.fluxtion.api.audit.Auditor> auditorMap,
SEPConfig config)
Create a new TopologicallySortedDependecyGraph
|
TopologicallySortedDependecyGraph(Map<Object,String> publicNodes) |
TopologicallySortedDependecyGraph(Object... obj) |
TopologicallySortedDependecyGraph(SEPConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
exportAsGraphMl(Writer writer,
boolean addEvents)
exports graph as graphml, can be exported with and without event as nodes
on the graph.
|
<T> T |
findOrCreateNode(Class<T> clazz,
Map config,
String variableName) |
<T> T |
findOrCreateNode(Class<T> clazz,
Map config,
String variableName,
boolean isPublic) |
<T> T |
findOrCreatePublicNode(Class<T> clazz,
Map config,
String variableName) |
void |
generateDependencyTree()
Generates the dependency tree for introspection.
|
SEPConfig |
getConfig() |
List<?> |
getDirectChildren(Object parent)
returns a list of the direct children of this object in the SEP.node in the SEP
|
List<?> |
getDirectChildrenListeningForEvent(Object parent) |
List<?> |
getDirectParents(Object child)
returns a list of the direct parents of this object in the SEP.
|
List<?> |
getDirectParentsListeningForEvent(Object child) |
List<Object> |
getEventSortedDependents(Object obj) |
Map<Object,String> |
getInstanceMap() |
Map<String,com.fluxtion.api.audit.Auditor> |
getRegistrationListenerMap() |
List<Object> |
getSortedDependents() |
List<Object> |
getSortedDependents(Object obj) |
boolean |
isPublicNode(Object node) |
<T extends com.fluxtion.api.audit.Auditor> |
registerAuditor(T node,
String auditorName) |
<T> T |
registerNode(T node,
String variableName) |
<T> T |
registerNode(T node,
String variableName,
boolean isPublic) |
<T> T |
registerPublicNode(T node,
String variableName) |
String |
variableName(Object node)
Accessor to the name mapping for an instance.
|
public TopologicallySortedDependecyGraph(Object... obj)
public TopologicallySortedDependecyGraph(List nodes)
public TopologicallySortedDependecyGraph(Map<Object,String> publicNodes)
public TopologicallySortedDependecyGraph(DeclarativeNodeConiguration declarativeNodeConiguration)
public TopologicallySortedDependecyGraph(List nodes, Map<Object,String> publicNodes)
public TopologicallySortedDependecyGraph(SEPConfig config)
public TopologicallySortedDependecyGraph(List nodes, Map<Object,String> publicNodes, DeclarativeNodeConiguration declarativeNodeConiguration, GenerationContext context, Map<String,com.fluxtion.api.audit.Auditor> auditorMap, SEPConfig config)
nodes
- The set of nodes that will be sorted as a list.publicNodes
- Map of public available instances, the value is the
unique name of each instance. The names will override existing instances
in the nodes List or add the node to the set.declarativeNodeConiguration
- factory descriptionstrat
- NodeNameProducer strategycontext
- Generation context for this cycleauditorMap
- Auditors to injectconfig
- Config for this generation cyclepublic String variableName(Object node)
node
- The instance to for this lookup.public Map<String,com.fluxtion.api.audit.Auditor> getRegistrationListenerMap()
public List<Object> getSortedDependents(Object obj) throws Exception
obj
- The root object to search from in the graph.Exception
- when generating graphpublic List<Object> getEventSortedDependents(Object obj) throws Exception
Exception
public List<?> getDirectChildren(Object parent)
parent
- node in the SEPpublic List<?> getDirectParents(Object child)
child
- in the SEPpublic <T> T registerPublicNode(T node, String variableName)
registerPublicNode
in interface NodeRegistry
public <T extends com.fluxtion.api.audit.Auditor> T registerAuditor(T node, String auditorName)
registerAuditor
in interface NodeRegistry
public <T> T registerNode(T node, String variableName, boolean isPublic)
public <T> T registerNode(T node, String variableName)
registerNode
in interface NodeRegistry
public <T> T findOrCreatePublicNode(Class<T> clazz, Map config, String variableName)
findOrCreatePublicNode
in interface NodeRegistry
public <T> T findOrCreateNode(Class<T> clazz, Map config, String variableName)
findOrCreateNode
in interface NodeRegistry
public <T> T findOrCreateNode(Class<T> clazz, Map config, String variableName, boolean isPublic)
public void generateDependencyTree() throws Exception
Exception
- when problem generating the dependency treepublic boolean isPublicNode(Object node)
public SEPConfig getConfig()
public void exportAsGraphMl(Writer writer, boolean addEvents) throws SAXException, TransformerConfigurationException
writer
- targetaddEvents
- flag to control inclusion of events as nodesSAXException
- problem writing jpgraphMlTransformerConfigurationException
- problem writing jpgraphMlCopyright © 2019. All rights reserved.