Class FileEITransport

java.lang.Object
com.nt.udc.ndk.node.EITransport
com.metasolv.nm.collector.file.FileEITransport
All Implemented Interfaces:
DataProviderIfc, DCTransport, FileDataProviderIfc, Runnable

public class FileEITransport extends EITransport
This class is based on the other FileEITransport class of the same name. The main differences are that the FileEITransport is now responsible for instantiating the FTP objects, and that the data processing layer has been separated into a distinct file handler object instead of being handled in a sub-classed object. The FileEITransport class is responsible for managing the data files on the local server. It will initialize the FTP objects if an FTP-pull approach is being used. It will then poll the configured local directory for new data files and will pass them to the file handler object for processing. Once the file handler has finished processing the file, the transport will either rename or delete it based on the node's configuration. This class will also provide a safety mechanism whereby it will rename files that are not successfully processed after 3 attempts with a ".error" extension. This will ensure that a corrupt file does not hold up the processing of subsequent valid files. This class provides a mechanism to monitor a directory for files to process by either a "SynchronizedDirectory" object or a standard File Object. A SynchronizedDirectory object is used when objects of this class need to be informed when files are available, and the standard File object is used when this class directly monitors the directory.