Class FileEINode

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

public class FileEINode extends EINode
This class is based on the FlatFileEINode class. The main difference is that the FileEINode is no longer responsible for instantiating the FTP objects. Instead, this responsibility is left up to the transport object. The FileEINode class initializes all of the node's main components including the transport, the NPL field processor, the DC stream handler, and the GUI. It also initializes the ASCII file handler as its default file handler. The FileEINode is an EI Node that periodically retrieves one or more files from a local directory and processes them via a file handler object. The files can be "pushed" to the local directory, or they can be "pulled" via FTP.
  • Field Details

    • minorType

      protected static final String minorType
      See Also:
    • configDataGUIClass

      protected static final String configDataGUIClass
      See Also:
    • configDataClass

      protected static final String configDataClass
      See Also:
    • fileduplicateCheck

      protected FileEIDuplicateCheck fileduplicateCheck
    • fileSeqCheck

      protected FileEISequenceCheck fileSeqCheck
    • transport

      protected EITransport[] transport
    • fileHandler

      protected FileHandlerIfc fileHandler
    • fileHndlr

      protected FileHandlerIfc[] fileHndlr
    • nplFile

      protected String nplFile
    • no_of_threads

      protected int no_of_threads
    • mtChecked

      protected boolean mtChecked
    • isOrdered

      protected boolean isOrdered
    • fdChecked

      protected boolean fdChecked
    • file_expiry_time

      protected int file_expiry_time
    • fsChecked

      protected boolean fsChecked
    • fileSuffix

      protected String fileSuffix
    • ftpFileTracker

      protected FtpFileTracker ftpFileTracker
    • ioLock

      protected com.nt.common.util.SMGLock ioLock
      Used to properly shut down all threads. This object serves as a lock that the EI must obtain before interrupting the transport thread. This prevents the EI from interrupting the transport thread in the middle of any I/O operations (like writing NAR files or writing scratch files).
    • threadManager

      protected MultiThreadManager threadManager
    • fileCycler

      protected EIFileCycler fileCycler
    • fileLevelTransaction

      protected boolean fileLevelTransaction
    • pattern

      protected String pattern
  • Constructor Details

    • FileEINode

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

      public FileEINode(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

    • getFileEINodeHandler

      protected FileEINodeHandler getFileEINodeHandler()
    • initConfig

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

      protected void initFieldProcessor() throws NodeStartException
      Throws:
      NodeStartException
    • initFileHandler

      protected void initFileHandler() throws NodeStartException
      Throws:
      NodeStartException
    • initTransport

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

      public void backup()
      Description copied from class: DCNode
      Empty implementation
      Overrides:
      backup in class DCNode
    • reconfigure

      public void reconfigure()
      Description copied from class: EINode
      Call that reconfigures an EINode object for warm restart. This method performs node reconfiguration processing specific to an EINode object. Derived classes that need to perform their own reconfiguration processing should override reconfigure() and then call this method from there. A flag is set in the DCNode base class indicating this node is in the reconfiguration state. The most derived class should use the setIsReconfiguringFlag method just before returning from its reconfigure() method to set the reconfiguration state to false.
      Specified by:
      reconfigure in interface AdminIfc
      Overrides:
      reconfigure in class EINode
    • shutdown

      public void shutdown()
      Description copied from class: DCNode
      Performs all necessary functions to stop this node and any processes that it has created.
      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.
      Overrides:
      getConfigDataClass in class DCNode
      Returns:
      "com.nt.udc.ndk.gui.DCNodeConfigData"
    • getFileHandler

      public FileHandlerIfc getFileHandler()
    • isHealthy

      public boolean isHealthy()
      Description copied from class: EINode
      This method is used to check the transport's state of health. The criterion for determining the node's health is based on the transport's health and whether all registered threads are alive. It is to be overridden by subclasses.
      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()