|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.wicketstuff.progressbar.spring.TaskService
public class TaskService
Should be registered as SESSION scoped bean to prevent memory leaks with unfinished tasks.
TODO automatic cleanup of tasks
| Constructor Summary | |
|---|---|
TaskService(Executor executor)
|
|
| Method Summary | |
|---|---|
void |
cancel(Long taskId)
Cancel the task with given taskId. |
void |
finish(Long taskId)
Cleanup the task with the given taskId and remove it from the task service. |
List<Task.Message> |
getMessages(Long taskId)
|
org.wicketstuff.progressbar.Progression |
getProgression(Long taskId)
Get the current progression of a task. |
Long |
schedule(Task task)
Schedules the task, but doesn't start! |
Long |
scheduleAndStart(Task task)
Schedule and start a task. |
void |
start(Long taskId)
Start the task with given taskId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TaskService(Executor executor)
| Method Detail |
|---|
public Long schedule(Task task)
ITaskService
schedule in interface ITaskServicetask - The task to schedule
public void start(Long taskId)
ITaskService
start in interface ITaskServicepublic void cancel(Long taskId)
ITaskService
cancel in interface ITaskServicepublic Long scheduleAndStart(Task task)
ITaskServiceLong taskId = taskService.schedule(task); taskService.start(taskId);
scheduleAndStart in interface ITaskServicepublic void finish(Long taskId)
ITaskService
finish in interface ITaskServicepublic org.wicketstuff.progressbar.Progression getProgression(Long taskId)
ITaskService
getProgression in interface ITaskServicepublic List<Task.Message> getMessages(Long taskId)
getMessages in interface ITaskService
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||