public class TopologicallySortedDependencyGraph extends Object implements NodeRegistry
| Modifier and Type | Field and Description |
|---|---|
static com.fluxtion.runtime.callback.CallbackDispatcherImpl |
CALLBACK_DISPATCHER |
| Constructor and Description |
|---|
TopologicallySortedDependencyGraph(EventProcessorConfig config) |
TopologicallySortedDependencyGraph(List<?> nodes) |
TopologicallySortedDependencyGraph(List<?> nodes,
Map<Object,String> publicNodes,
NodeFactoryRegistration nodeFactoryRegistration,
GenerationContext context,
Map<String,com.fluxtion.runtime.audit.Auditor> auditorMap,
EventProcessorConfig config)
Create a new TopologicallySortedDependecyGraph
|
TopologicallySortedDependencyGraph(Map<Object,String> publicNodes) |
TopologicallySortedDependencyGraph(Object... obj) |
| 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<String,Object> config,
String variableName)
Find or create a node using a registered
NodeFactory. |
<T> T |
findOrCreateNode(Class<T> clazz,
Map<String,Object> config,
String variableName,
boolean isPublic) |
<T> T |
findOrCreatePublicNode(Class<T> clazz,
Map<String,Object> config,
String variableName)
Find or create a node using a registered
NodeFactory. |
void |
generateDependencyTree()
Generates the dependency tree for introspection.
|
EventProcessorConfig |
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() |
List<Object> |
getObjectSortedDependents() |
Map<String,com.fluxtion.runtime.audit.Auditor> |
getRegistrationListenerMap() |
List<Object> |
getSortedDependents() |
List<Object> |
getSortedDependents(Object obj) |
boolean |
isPublicNode(Object node) |
<T extends com.fluxtion.runtime.audit.Auditor> |
registerAuditor(T node,
String auditorName)
Register an
Auditor with Fluxtion generator. |
<T> T |
registerNode(T node,
String variableName)
Register a user created node with Fluxtion generator, no
NodeFactory's will be used in this operation. |
<T> T |
registerNode(T node,
String variableName,
boolean isPublic) |
<T> T |
registerPublicNode(T node,
String variableName)
Register a user created node with Fluxtion generator, no
NodeFactory's will be used in this operation. |
static boolean |
trySetAccessible(Field field) |
String |
variableName(Object node)
Accessor to the name mapping for an instance.
|
public static final com.fluxtion.runtime.callback.CallbackDispatcherImpl CALLBACK_DISPATCHER
public TopologicallySortedDependencyGraph(Object... obj)
public TopologicallySortedDependencyGraph(List<?> nodes)
public TopologicallySortedDependencyGraph(Map<Object,String> publicNodes)
public TopologicallySortedDependencyGraph(EventProcessorConfig config)
public TopologicallySortedDependencyGraph(List<?> nodes, Map<Object,String> publicNodes, NodeFactoryRegistration nodeFactoryRegistration, GenerationContext context, Map<String,com.fluxtion.runtime.audit.Auditor> auditorMap, EventProcessorConfig 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.nodeFactoryRegistration - factory descriptioncontext - 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 List<Object> getObjectSortedDependents() throws Exception
Exceptionpublic Map<String,com.fluxtion.runtime.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
Exceptionpublic List<?> getDirectChildren(Object parent)
parent - node in the SEPpublic List<?> getDirectParents(Object child)
child - in the SEPpublic <T> T registerPublicNode(T node,
String variableName)
NodeRegistryNodeFactory's will be used in this operation. The node will have
public scope and the name will be generated from a
NodeNameProducer strategy if the supplied name is null.registerPublicNode in interface NodeRegistryT - The type of the node to be created.node - The node to add to the SEPvariableName - the variableName name of the nodepublic <T extends com.fluxtion.runtime.audit.Auditor> T registerAuditor(T node,
String auditorName)
NodeRegistryAuditor with Fluxtion generator. The Auditor will
have public scope registered with the name provided.registerAuditor in interface NodeRegistryT - The Auditor classnode - The Auditor to registerauditorName - the public name of the Auditorpublic <T> T registerNode(T node,
String variableName,
boolean isPublic)
public <T> T registerNode(T node,
String variableName)
NodeRegistryNodeFactory's will be used in this operation. The node will have
private scope and the name will be generated from a
NodeNameProducer strategy if the supplied name is null.registerNode in interface NodeRegistryT - The type of the node to be created.node - The node to add to the SEPvariableName - the variableName name of the nodepublic <T> T findOrCreatePublicNode(Class<T> clazz, Map<String,Object> config, String variableName)
NodeRegistryNodeFactory. The
generated node will have public scope and the name will be generated from
a NodeNameProducer strategy if the supplied name is null.findOrCreatePublicNode in interface NodeRegistryT - The type of the node to be created.clazz - The class of type Tconfig - a map used by a NodeFactory to create a node.variableName - the variable name in the SEPpublic <T> T findOrCreateNode(Class<T> clazz, Map<String,Object> config, String variableName)
NodeRegistryNodeFactory. The
generated node will have private scope and the name will be generated
from a NodeNameProducer strategy if the supplied name is null.findOrCreateNode in interface NodeRegistryT - The type of the node to be created.clazz - The class of type Tconfig - a map used by a NodeFactory to create a node.variableName - the variable name in the SEPpublic <T> T findOrCreateNode(Class<T> clazz, Map<String,Object> config, String variableName, boolean isPublic)
public void generateDependencyTree()
throws Exception
Exception - when problem generating the dependency treepublic boolean isPublicNode(Object node)
public EventProcessorConfig 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 jpgraphMlpublic static boolean trySetAccessible(Field field)
Copyright © 2022. All rights reserved.