Class FtpEIManager

java.lang.Object
com.metasolv.nm.collector.file.FtpEIManager

public class FtpEIManager extends Object
This class is based on the FtpEITransportHandler class. The FtpEIManager class is responsible for initializing and managing a set of FTP threads. It will parse the node's configuration object to determine how many FTP servers were configured, and it will start one FtpEIThread thread for each of them. It will also instantiate the FtpFileTracker object that is used by the threads in order keep track of the files that they have retrieved from the remote servers. An example of the required ftp config file is: # # Comment lines begin with '#'... # NumberOfHosts 2 DelayTime 1 DelayTimeUnits Hours DeleteFiles false RenameFiles false ### Host0 ### FtpType0 Regular RemoteHost0 132.l23.204.39 RemoteDir0 /SYSTEM/DCLOG/ Mode0 simple Prefix0 Suffix0 .txt RegularExpression0 Login0 someUsername Password0 somePassword ### Host1 ### FtpType1 Regular RemoteHost1 132.l23.204.40 RemoteDir1 /tmp Mode1 regularexpression Prefix1 Suffix1 RegularExpression1 .+\.txt Login1 someUsername Password1 somePassword Use the '/' as the path separator, as this is the path separator recognized by FTP servers regardless of the operating system.
  • Field Details

    • MIN

      public final String MIN
    • HR

      public final String HR
    • DAYS

      public final String DAYS
    • DAYS_TO_TRACK

      public static final String DAYS_TO_TRACK
      See Also:
    • MINUTES2SECS

      protected static final int MINUTES2SECS
      See Also:
    • HOURS2SECS

      protected static final int HOURS2SECS
      See Also:
    • DAYS2SECS

      protected static final int DAYS2SECS
      See Also:
    • FTP_DEFAULT_DELAY_TIME

      protected final int FTP_DEFAULT_DELAY_TIME
      See Also:
    • INTERRUPT_TIME_DELAY

      protected final int INTERRUPT_TIME_DELAY
      See Also:
    • dir

      protected SynchronizedDirectory dir
    • einode

      protected DCNode einode
    • config

      protected ConfigIfc config
    • logger

      protected LoggerIfc logger
    • localSuffix

      protected String localSuffix
    • isBinaryTransferMode

      protected boolean isBinaryTransferMode
    • totalHosts

      protected int totalHosts
    • delayTime

      protected int delayTime
    • deleteFlag

      protected boolean deleteFlag
    • renameFlag

      protected boolean renameFlag
    • ftpType

      protected String[] ftpType
    • hosts

      protected String[] hosts
    • remoteFileDirs

      protected String[] remoteFileDirs
    • modes

      protected String[] modes
    • prefixes

      protected String[] prefixes
    • suffixes

      protected String[] suffixes
    • regExps

      protected String[] regExps
    • loginStrs

      protected String[] loginStrs
    • pwStrs

      protected String[] pwStrs
    • ftpConfig

      protected Config ftpConfig
    • ftpFileTracker

      protected FtpFileTracker ftpFileTracker
    • ftpThreads

      protected FtpEIThread[] ftpThreads
    • interruptTimeDelay

      protected int interruptTimeDelay
    • ioLock

      protected com.nt.common.util.SMGLock ioLock
  • Constructor Details

  • Method Details

    • setBinaryTransferMode

      public void setBinaryTransferMode(boolean isBinaryTransferMode)
    • getFtpConfig

      protected void getFtpConfig() throws NodeStartException
      Throws:
      NodeStartException
    • startRetrieval

      public void startRetrieval()
    • shutdown

      public void shutdown()
    • isHealthy

      public boolean isHealthy()
    • getInterruptTimeDelay

      public int getInterruptTimeDelay()
    • setInterruptTimeDelay

      public void setInterruptTimeDelay(int interruptTimeDelay)
    • setIOLock

      public void setIOLock(com.nt.common.util.SMGLock lock)