All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.drapostolos.adp4j.core.InitialContentEvent Maven / Gradle / Ivy

Go to download

This library provides a Java SPI for polling directories on a REMOTE filesystem/ftp servers (etc) for changes (like file-Added/Removed/Modified).

The newest version!
package com.github.drapostolos.adp4j.core;

import java.util.HashSet;
import java.util.Set;

import com.github.drapostolos.adp4j.spi.FileElement;
import com.github.drapostolos.adp4j.spi.PolledDirectory;

/**
 * An event that provides the initial content of the {@link PolledDirectory}.
 * 

* The initial content of a directory are the files/directories * it contains the first poll-cycle. * */ public final class InitialContentEvent extends AbstractDirectoryEvent{ private final Set files; InitialContentEvent(DirectoryPoller dp, PolledDirectory directory, Set files) { super(dp, directory); this.files = files; } /** * Returns a set of all {@link FileElement}s contained in a {@link PolledDirectory} * at startup. */ public Set getFiles(){ return new HashSet(files); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy