KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > mybatchfwk > test > SimpleTask


1 /*
2  * Created on 15 août 2006
3  */

4 package net.sf.mybatchfwk.test;
5
6 import net.sf.mybatchfwk.ITask;
7 import net.sf.mybatchfwk.TaskExecutionException;
8
9 public class SimpleTask implements ITask {
10     
11     private int id = 0;
12     
13     public SimpleTask(int id) {
14         this.id = id;
15     }
16
17     public String JavaDoc getId() {
18         return Integer.toString(id);
19     }
20
21     public void run() {
22         try {
23             Thread.sleep(500);
24         } catch (InterruptedException JavaDoc e) {
25             throw new TaskExecutionException(e);
26         }
27     }
28
29 }
30
Popular Tags