KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jftp > gui > base > LogFlusher


1 package net.sf.jftp.gui.base;
2
3 import net.sf.jftp.JFtp;
4 import net.sf.jftp.config.Settings;
5
6
7 public class LogFlusher implements Runnable JavaDoc
8 {
9     private Thread JavaDoc runner;
10
11     public LogFlusher()
12     {
13         runner = new Thread JavaDoc(this);
14
15         if(Settings.useLogFlusher)
16         {
17             runner.start();
18         }
19     }
20
21     public void run()
22     {
23         while(true)
24         {
25             try
26             {
27                 runner.sleep(Settings.logFlushInterval);
28             }
29             catch(InterruptedException JavaDoc ex)
30             {
31                 ex.printStackTrace();
32             }
33
34             //System.out.println("logflush");
35
JFtp.statusP.jftp.ensureLogging();
36         }
37     }
38 }
39
Popular Tags