1 package org.treetank.filelistener.file; 2 3 import java.util.concurrent.LinkedBlockingQueue; 4 5 /** 6 * Since FilesystemNotifications mainly run in different threads than the observer, 7 * the notifications are observed using this interface instead. 8 * 9 * @author Andreas Rain 10 * 11 */ 12 public interface FilesystemNotificationObserver { 13 14 /** 15 * Adds a new notification to the observer. 16 * @return blocking queue holding notifications for direct submission 17 */ 18 public LinkedBlockingQueue<FilesystemNotification> getBlockingQueue(); 19 20 /** 21 * Adds a notification to the blocking queue. 22 * @param n - FilesystemNotification 23 */ 24 void addNotification(FilesystemNotification n); 25 26 }