Interface PollingFileSource
- All Superinterfaces:
EventSource<FileEvent>,PollingSource<FileEvent>,Runnable
- All Known Implementing Classes:
FileEventActivitySource,FileEventSource
@ConfigurationDescription(properties={@Property(name="SearchDirectoryPath",description="The path of the directory which causes an event when a new file is inserted."),,,,,,,})
public interface PollingFileSource
extends PollingSource<FileEvent>
An event source causing an event based on the presence of a file. This may be
a file that has been stored to a special folder.
An ordinary implementation of this file source creates an event for each file (and possibly also a directory) present in the folder. This is good for mostly empty folders. Filters may apply for specific files. It is not advised to track the files internally and only create events for new files and ignore existing files. This should be rather solved with an event handler moving a file that has been successfully handled so that the file source does not find the file again.
An ordinary implementation of this file source creates an event for each file (and possibly also a directory) present in the folder. This is good for mostly empty folders. Filters may apply for specific files. It is not advised to track the files internally and only create events for new files and ignore existing files. This should be rather solved with an event handler moving a file that has been successfully handled so that the file source does not find the file again.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfiguration key for the file name filter.static final StringConfiguration key for the is lock file flag.static final StringConfiguration key for the lock file event flag.static final StringConfiguration key for the lock suffix.static final StringConfiguration key for the directory in which to look for the files that cause the events of this event source.static final StringConfiguration key for the skip directories filter.static final StringConfiguration key for the skip files filter.static final StringConfiguration key for the skip locked files filter.Fields inherited from interface de.aristaflow.adept2.model.events.sources.PollingSource
CONF_POLL_TIME, CONF_START_TIME -
Method Summary
Methods inherited from interface de.aristaflow.adept2.model.events.sources.EventSource
addAll, addHandler, getEventHandler, getHierarchicalSourceName, getID, getType, removeHandler, setConfigurationMethods inherited from interface de.aristaflow.adept2.model.events.sources.PollingSource
getPollTime, getStartTime, init, terminate
-
Field Details
-
CONF_SEARCH_DIRECTORY
Configuration key for the directory in which to look for the files that cause the events of this event source.- See Also:
-
CONF_FILENAME_FILTER
Configuration key for the file name filter.- See Also:
-
CONF_SKIP_DIRECTORIES
Configuration key for the skip directories filter.- See Also:
-
CONF_SKIP_FILES
Configuration key for the skip files filter.- See Also:
-
CONF_SKIP_LOCKED
Configuration key for the skip locked files filter.- See Also:
-
CONF_LOCK_SUFFIX
Configuration key for the lock suffix.- See Also:
-
CONF_LOCK_FILE_EVENT
Configuration key for the lock file event flag.- See Also:
-
CONF_IS_LOCK_FILE
Configuration key for the is lock file flag.- See Also:
-