KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > mybatchfwk > ITask


1 /*
2  * MyBatchFramework - Open-source batch framework.
3  * Copyright (C) 2006 Jérôme Bertèche cyberteche@users.sourceforge.net
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * Jérôme Bertèche
16  * Email: cyberteche@users.sourceforge.net
17  */

18 package net.sf.mybatchfwk;
19
20 /**
21  * Tasks given to the executor service must implements this interface
22  * @author Jérôme Bertèche (cyberteche@users.sourceforge.net)
23  */

24 public interface ITask extends Runnable JavaDoc {
25     
26     /**
27      * Return the id of the task.<br>
28      * The id is store to the execution report after the completion or the failure of the task.
29      * @return the id of the task
30      */

31     public String JavaDoc getId();
32     
33     /**
34      * The run method in which the task job must be defined.
35      * If an error occured, a TaskExecutionException must be throw.
36      * @see TaskExecutionException
37      */

38     public void run();
39 }
40
Popular Tags