bitronix.tm.timer.Task Maven / Gradle / Ivy
package bitronix.tm.timer;
import java.util.Date;
/**
* Asbtract superclass of all timed tasks.
*
*
* @author lorban
*/
public abstract class Task {
private Date executionTime;
private TaskScheduler taskScheduler;
protected Task(Date executionTime, TaskScheduler scheduler) {
this.executionTime = executionTime;
this.taskScheduler = scheduler;
}
public Date getExecutionTime() {
return executionTime;
}
public void setExecutionTime(Date executionTime) {
this.executionTime = executionTime;
}
protected TaskScheduler getTaskScheduler() {
return taskScheduler;
}
public abstract Object getObject();
public abstract void execute() throws TaskException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy