Class NPLProcessorNode

All Implemented Interfaces:
AdminIfc, ConfigIfc, LoggerIfc, NodeHealthIfc, NodeStateManagementIfc, PropertyIfc, StateManagementIfc
Direct Known Subclasses:
FileEnhancerNode, FlexibleAggregatorNode, NMinusOneRecordNode

public class NPLProcessorNode extends GeneralNPLProcessorNode
This Processor Node is the default for doing procedural processing with NPL. This class provides a default implementation for general use with the basic NPLFieldProcessor. This node takes NARs as input, and writes NARs as output. It then manipulates those NARs based on the rules in and NPL file.
  • Field Details

    • numThreads

      protected int numThreads
    • fileLevelTransaction

      protected boolean fileLevelTransaction
  • Constructor Details

    • NPLProcessorNode

      public NPLProcessorNode() throws NodeStartException
      Default Constructor.
      Throws:
      NodeStartException
    • NPLProcessorNode

      public NPLProcessorNode(String[] args) throws NodeStartException
      Constructor for the NPLProcessorNode. Sets up an NPLFieldProcessor and sets the DCFieldContainer to be a NAR. At the end of the constructor the node is started.
      Parameters:
      args - Passed to super class ProcessorNode
      Throws:
      NodeStartException
  • Method Details

    • shutdown

      public void shutdown()
      Performs the necessary tasks to properly shutdown the node.
      Specified by:
      shutdown in interface AdminIfc
      Overrides:
      shutdown in class GeneralNPLProcessorNode
    • getMinorType

      public String getMinorType()
      Returns the type name of the NPLProcessor node.
      Specified by:
      getMinorType in class DCNode
      Returns:
      Returns the minor type identifier for this node.
    • getConfigDataGuiClass

      public String getConfigDataGuiClass()
      Returns the name of the NPLFieldProcessor Config Data GUI class.
      Specified by:
      getConfigDataGuiClass in class DCNode
      Returns:
      Returns the class name of the DCNodeConfigGUI object used by the node.
    • getCfgData

      protected void getCfgData()
      Reads the applicable configuration data through the ConfigIfc interface This method should be over-ridden by the derived class if there is more than just a rulesfile being fetched from the config. Of course, the derived method should call this method as super.getCfgData() to pickup the rules file attribute.
    • configureFieldProcessor

      protected DCFieldProcessor configureFieldProcessor() throws NodeProcessingException
      Sets up the general NPLFieldProcesser passing a NAR as the output class for the Field Processor, and passes the NPL file gained from the config for parsing instructions for the NPL. This method should be over-ridden by derived classes, if the derived class needs to construct it's field processor with additional information (for example, constructing the FieldProcessor with a IDCMethodHandler object.
      Returns:
      The DCFieldProcessor that has been configured.
      Throws:
      NodeProcessingException
    • getPerformanceMetrics

      public DCNodePerformanceIfc getPerformanceMetrics()
      Description copied from class: DCNode
      Returns the stream handler's node performance object
      Specified by:
      getPerformanceMetrics in interface AdminIfc
      Overrides:
      getPerformanceMetrics in class DCNode
      Returns:
      DCNodePerformanceIfc object
    • isNodeStateImplemented

      public boolean isNodeStateImplemented()
      This node uses specific Objects that are responsible for containing its state. Therefore, this method must return "true".
      Overrides:
      isNodeStateImplemented in class DCNode
      Returns:
      true
    • isNodeStateUsed

      public boolean isNodeStateUsed()
      Returns whether the node state is used (and whether the node can be recovered. Currently disabled for NPLProcessorNode.
      Specified by:
      isNodeStateUsed in interface NodeStateManagementIfc
      Overrides:
      isNodeStateUsed in class GeneralNPLProcessorNode
      Returns:
      true, if node state is being used
    • main

      public static void main(String[] args)
      The main method is useful for debugging and development purposes. However, this method will never actually be called when the node is run within the actual application. The node is a Thread in the application, rather than a process.