/** * Thread that reads from a database. * * @author Franck van Breugel */ public class Reader extends Thread { private Database database; /** * Initializes this reader with the given database. * * @param database the database from which to read. */ public Reader(Database database) { super(); this.database = database; } /** * Continuously reading the database. */ public void run() { while (true) { try { this.database.read(); } catch (InterruptedException e) { e.printStackTrace(); } } } }