Class FtpFileEINode

All Implemented Interfaces:
AdminIfc, ConfigIfc, LoggerIfc, NodeHealthIfc, NodeStateManagementIfc, PropertyIfc, StateManagementIfc

public class FtpFileEINode extends EINode
Provides a generic EI Node for periodically retrieving one or more files via FTP from one or more FTP servers and processing them according to a processing object specified at runtime. This EI uses the FtpEITransportHandler class to manage a group of one or more FtpEITransport threads. An additional processing thread is instantiated with the appropriate processing object, which must be derived from the FileProcessing class. This EI Node can be used for processing ASCII log files from a GGSN (Contivity box) and for processing Versalar binary accounting files, since all of those files are retrieved via FTP.

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

  • fileProcessorClass - a String specifying the processor class

  • Constructor Details

    • FtpFileEINode

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

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

    • initFieldProcessor

      protected void initFieldProcessor() throws NodeProcessingException
      Initialize field processor and allow derive classes to override this method
      Throws:
      NodeProcessingException
    • createTransportHandler

      protected FtpEITransportHandler createTransportHandler(SynchronizedDirectory localDir, String fileSuffix) throws NodeStartException
      override this class to return the correct transport handler
      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