API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.scheduler. JOTScheduledItem View Javadoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

/*
------------------------------------
JavaOnTracks          Thibaut Colar
tcolar-jot AT colar DOT net
Artistic Licence 2.0
http://www.javaontracks.net
------------------------------------
 */
package net.jot.scheduler;

/**
 * A scheduledItem is an object that should run an action on a specific schedule
 * Implement this interface to create your own scheduled object.
 * 
*/
public interface JOTScheduledItem {
	/**
	 * Implement here what should be run at the scheduled time.
	 * Note: you should not call it from your own code run() but instead use forceRun() if you want to force a run.
	 */
	public void run();
	
	/**
	 * Implement if you want to skip run in particular cases (say while you do something else)
	 * Or just return false to never skip.
	 */
	public boolean skipRun();
	
	/**
	 * Implement if you want to FORCE a run right away (well within a few ms anyway)
	 * Returns false by default.
	 */
	public boolean forceRun();
	
	/**
	 * Will be called once a run has completed.
	 * Use this if you nedd to wait for a run to complete.
	 * Or if you want to fire some sort of event once the job is complete.
	 */
	public void runCompleted();
}

Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar