KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > core > util > DaemonTask


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.core.util;
11
12 /**
13  * Defines a task to run in a daemon thread.
14  * A task should define a {@link #executeTask()} method and a {@link #getSleepPeriod()} method to define it's behavior.
15  *
16  * @since MMBase-1.8
17  */

18 public interface DaemonTask {
19
20     /**
21      * Returns this task's sleep period.
22      */

23     public int getSleepPeriod();
24
25     /**
26      * Defines a task that need be run by a daemon thread's run() method.
27      */

28     public void executeTask();
29
30 }
31
Popular Tags