Class FlatFileEINode

All Implemented Interfaces:
AdminIfc, ConfigIfc, LoggerIfc, NodeHealthIfc, NodeStateManagementIfc, PropertyIfc, StateManagementIfc
Direct Known Subclasses:
NAREINode

public class FlatFileEINode extends EINode
Provides an EI Node for periodically retrieving one or more files from a local directory and processing them according to a processing object specified at runtime. The files can be "pushed" to the local directory, or this EI can use FTP to "pull" the files.

Make sure the general configuration file for this node specifies the following:

  • fileProcessorClass - a String specifying the processor class
  • localFileSuffix - a String specifying the suffix of local files to process
  • useFtp - a boolean specifying whether to pull the files

  • Field Details

    • localDir

      protected File localDir
    • sd_localDir

      protected SynchronizedDirectory sd_localDir
    • no_of_threads

      protected int no_of_threads
    • fdChecked

      protected boolean fdChecked
    • file_expiry_time

      protected int file_expiry_time
    • fsChecked

      protected boolean fsChecked
    • threadManager

      protected MultiThreadManager threadManager
    • fileCycler

      protected EIFileCycler fileCycler
    • fileLevelTransaction

      protected boolean fileLevelTransaction
    • fileduplicateCheck

      protected FileEIDuplicateCheck fileduplicateCheck
    • fileSeqCheck

      protected FileEISequenceCheck fileSeqCheck
  • Constructor Details

    • FlatFileEINode

      public FlatFileEINode()
      Default Constructor; instantiates objects necessary to define the DCNodeTypeIfc methods.
    • FlatFileEINode

      public FlatFileEINode(String[] args) throws NodeStartException
      Constructor for the class. Calls the super class EINode with the given array of arguments.
      Parameters:
      args - Arguments to be passed to the DCNode super class.
      Throws:
      NodeStartException
  • Method Details

    • initConfig

      protected void initConfig() throws NodeStartException
      Throws:
      NodeStartException
    • backup

      public void backup()
      Performs the necessary tasks to create a backup of the incoming or outgoing data. This task is initiated by the node manager periodically, if the node is configured to be backed up.
      Overrides:
      backup in class DCNode
    • reconfigure

      public void reconfigure()
      Performs the necessary tasks to reconfigure the node while it is running. This task is initiated by the node manager.
      Specified by:
      reconfigure in interface AdminIfc
      Overrides:
      reconfigure in class EINode
    • shutdown

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

      public String getMinorType()
      Returns the type name of the EI 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 Config Data GUI class for this node.
      Specified by:
      getConfigDataGuiClass in class DCNode
      Returns:
      Returns the class name of the DCNodeConfigGUI object used by the node.
    • getConfigDataClass

      public String getConfigDataClass()
      Returns the name of the config data class for this node. This is an overridden method.
      Overrides:
      getConfigDataClass in class DCNode
      Returns:
      "com.nt.udc.ndk.gui.DCNodeConfigData"
    • getLock

      public com.nt.common.util.SMGLock getLock()
      Retrieves the lock for this node.
      Returns:
      the node's lock
    • main

      public static void main(String[] args)
      This method is useful for development and debugging purposes. Within the application, however, the main() method is never used.
    • isHealthy

      public boolean isHealthy()
      This method is used to check if the node is fully functional.
      Specified by:
      isHealthy in interface NodeHealthIfc
      Overrides:
      isHealthy in class EINode
      Returns:
      true if the transport is healthy, false otherwise
    • 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
    • deleteLockFiles

      public void deleteLockFiles()
    • movebackinProgFile

      public void movebackinProgFile(String filename)
    • getLocalDir

      public File getLocalDir()