Interface NodeRegistry


public interface NodeRegistry
Holds all the currently registered nodes and factories in a graph. If a node cannot be found then a NodeFactory will be used to create a new instance, using the provided map for configuration.

Users interact with the NodeRegistry through callbacks on the NodeFactory interface.

Author:
Greg Higgins
See Also:
NodeFactory
  • Method Summary

    Modifier and Type Method Description
    <T> T findOrCreateNode​(java.lang.Class<T> clazz, java.util.Map config, java.lang.String variableName)
    Find or create a node using a registered NodeFactory.
    <T> T findOrCreatePublicNode​(java.lang.Class<T> clazz, java.util.Map config, java.lang.String variableName)
    Find or create a node using a registered NodeFactory.
    <T extends com.fluxtion.api.audit.Auditor>
    T
    registerAuditor​(T node, java.lang.String auditorName)
    Register an Auditor with Fluxtion generator.
    <T> T registerNode​(T node, java.lang.String variableName)
    Register a user created node with Fluxtion generator, no NodeFactory's will be used in this operation.
    <T> T registerPublicNode​(T node, java.lang.String variableName)
    Register a user created node with Fluxtion generator, no NodeFactory's will be used in this operation.
  • Method Details

    • findOrCreateNode

      <T> T findOrCreateNode​(java.lang.Class<T> clazz, java.util.Map config, java.lang.String variableName)
      Find or create a node using a registered NodeFactory. The generated node will have private scope and the name will be generated from a NodeNameProducer strategy if the supplied name is null.
      Type Parameters:
      T - The type of the node to be created.
      Parameters:
      clazz - The class of type T
      config - a map used by a NodeFactory to create a node.
      variableName - the variable name in the SEP
      Returns:
      The node that is referenced by the config map.
    • findOrCreatePublicNode

      <T> T findOrCreatePublicNode​(java.lang.Class<T> clazz, java.util.Map config, java.lang.String variableName)
      Find or create a node using a registered NodeFactory. The generated node will have public scope and the name will be generated from a NodeNameProducer strategy if the supplied name is null.
      Type Parameters:
      T - The type of the node to be created.
      Parameters:
      clazz - The class of type T
      config - a map used by a NodeFactory to create a node.
      variableName - the variable name in the SEP
      Returns:
      The node that is referenced by the config map.
    • registerNode

      <T> T registerNode​(T node, java.lang.String variableName)
      Register a user created node with Fluxtion generator, no NodeFactory'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.
      Type Parameters:
      T - The type of the node to be created.
      Parameters:
      node - The node to add to the SEP
      variableName - the variableName name of the node
      Returns:
    • registerPublicNode

      <T> T registerPublicNode​(T node, java.lang.String variableName)
      Register a user created node with Fluxtion generator, no NodeFactory'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.
      Type Parameters:
      T - The type of the node to be created.
      Parameters:
      node - The node to add to the SEP
      variableName - the variableName name of the node
      Returns:
    • registerAuditor

      <T extends com.fluxtion.api.audit.Auditor> T registerAuditor​(T node, java.lang.String auditorName)
      Register an Auditor with Fluxtion generator. The Auditor will have public scope registered with the name provided.
      Type Parameters:
      T - The Auditor class
      Parameters:
      node - The Auditor to register
      auditorName - the public name of the Auditor
      Returns:
      The registered Auditor