1 19 20 package org.lucane.applications.reminder; 21 22 import java.util.*; 23 import org.lucane.applications.reminder.lookup.*; 24 import org.lucane.applications.reminder.lookup.calendar.CalendarLookup; 25 26 public class ReminderThread extends Thread 27 { 28 private ArrayList lookups; 29 30 public ReminderThread() 31 { 32 this.lookups = new ArrayList(); 33 this.lookups.add(new CalendarLookup()); 34 35 this.setDaemon(true); 36 } 37 38 public void run() 39 { 40 while(true) 41 { 42 try { 43 Thread.sleep(5*60*1000); } catch(InterruptedException ie) {} 45 46 Iterator i = lookups.iterator(); 47 while(i.hasNext()) 48 { 49 Lookup l = (Lookup)i.next(); 50 l.lookup(); 51 } 52 } 53 } 54 } | Popular Tags |