KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > claros > chat > threads > ClearThread


1 package org.claros.chat.threads;
2
3 import org.claros.chat.controllers.QueueController;
4
5 public class ClearThread extends Thread JavaDoc {
6     public void run() {
7         try {
8             Thread.sleep(1000 * 60 * 2);
9             QueueController.fullClear();
10         } catch (InterruptedException JavaDoc e1) {
11             // do nothing sier
12
}
13
14         while (true) {
15             try {
16                 QueueController.clear();
17                 Thread.sleep(1000 * 60 * 60);
18             } catch (Throwable JavaDoc e) {
19                 // do nothing sier
20
}
21             
22         }
23     }
24     
25 }
26
Popular Tags