Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.novell.nds.dirxml.driver.delimitedtext
Interface InputSource

All Superinterfaces:
  Extension

public interface InputSource
extends Extension

When a class implementing this interface is defined and present, the Delimited Text driver asks the class for new input files once every polling period, rather than looking for them directly on the local file system.

The input files that this class tells the driver about must still be present on the local file system, but this method provides the class with a way to periodically check some remote system for input, and then transfer that input to local files. For example, a class implementing this interface could check an FTP server for input files and then transfer them to the local file system and notify the driver.

In order for the driver to find the appropriate class that implements this interface, the DirXML administrator (implementor) needs to configure the `<publisher-options>` section of the driver configuration by adding a line similar to the following:

`<input-source display-name="InputSource Class">com.acme.MyInputSource</input-source>`

If you also add a line similar to the following, the string it contains will be passed to the `init` method of the `InputSource`:

`<input-source-params display-name="InputSource init string">MY CONFIG DATA</input-source-params>`

If the supplied value actually represents a class that is in a `.jar` file in the `lib` directory, that class will be polled for new input files.

See Also:
  `PreProcessor`, `PostProcessor`, `InputSorter`

Method Summary
`java.io.File[]` | `getInputFiles()` The driver invokes this method once every polling period to determine if there are new input files that need to be processed.

Methods inherited from interface com.novell.nds.dirxml.driver.delimitedtext.Extension
`init`

Method Detail

### getInputFiles

    public java.io.File[] getInputFiles()
                                 throws StatusException,
                                        java.lang.Exception

  The driver invokes this method once every polling period to determine if there are new input files that need to be processed. The method should return an array containing file names (including path) of input files available to the publisher channel for processing. Once the driver has processed the files, it will rename them using the rename extension parameter from the driver configuration, or delete them if the rename extension is empty.

  Returns:
    The input files that are ready for the publisher channel to process. If there are no new files to process, the method may return either an empty array, or null.
  Throws:
    `StatusException` - Throw this if you want to report an error all the way back to the DirXML engine.
    `java.lang.Exception` - If you throw any other exception, it will get reported back to the engine as an `error` status level and printed in red on the DSTrace utility.

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD