Class FileExtensionFilter

  • All Implemented Interfaces:
    RecordFilter<java.nio.file.Path>, RecordProcessor<java.nio.file.Path,​java.nio.file.Path>

    public class FileExtensionFilter
    extends java.lang.Object
    implements RecordFilter<java.nio.file.Path>
    Filter FileRecord having a payload file name ending with a given extension.
    Author:
    Mahmoud Ben Hassine ([email protected])
    • Constructor Detail

      • FileExtensionFilter

        public FileExtensionFilter​(java.lang.String... extensions)
        Create a new FileExtensionFilter.
        Parameters:
        extensions - a list of extensions. Example: .log
    • Method Detail

      • processRecord

        public Record<java.nio.file.Path> processRecord​(Record<java.nio.file.Path> record)
        Description copied from interface: RecordFilter
        Filter a record.
        Specified by:
        processRecord in interface RecordFilter<java.nio.file.Path>
        Specified by:
        processRecord in interface RecordProcessor<java.nio.file.Path,​java.nio.file.Path>
        Parameters:
        record - the record to filter.
        Returns:
        the input record if it should continue in the pipeline or null if the record should be filtered