org.entityfs.obs
Interface DirectoryMonitorer

All Superinterfaces:
Observable
All Known Implementing Classes:
PollingDirectoryMonitorer

public interface DirectoryMonitorer
extends Observable

A DirectoryMonitorer monitors a directory view for changes. Use this when monitoring a directory that is modified by some external source. For instance for monitoring a directory for incoming files.

Since:
1.0
Author:
Karl Gustafsson
In_jar:
entityfs-core

Method Summary
 DirectoryView getDirectoryView()
          Get the monitored directory view.
 long getTimestampOfLastEvent()
          Get the timestamp when the last event was fired.
 void start()
          Start the monitorer.
 void stop()
          Stop the monitorer.
 
Methods inherited from interface org.entityfs.event.Observable
addObserver, countObservers, deleteObserver, deleteObservers
 

Method Detail

getDirectoryView

DirectoryView getDirectoryView()
Get the monitored directory view.

Returns:
The monitored directory view.

getTimestampOfLastEvent

long getTimestampOfLastEvent()
Get the timestamp when the last event was fired.

Returns:
The timestamp of the last event.

start

void start()
Start the monitorer. No events are fired before this method is called.

The start method resets the monitorer's internal state, so if it is stopped and then started, events occurring while it's stopped will never be reported.


stop

void stop()
Stop the monitorer. No events are fired after this method is called.