summaryrefslogtreecommitdiffstats
path: root/api/src/main/java/org/openslx/taskmanager/api/CancellableTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/main/java/org/openslx/taskmanager/api/CancellableTask.java')
-rw-r--r--api/src/main/java/org/openslx/taskmanager/api/CancellableTask.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/api/src/main/java/org/openslx/taskmanager/api/CancellableTask.java b/api/src/main/java/org/openslx/taskmanager/api/CancellableTask.java
new file mode 100644
index 0000000..fa27091
--- /dev/null
+++ b/api/src/main/java/org/openslx/taskmanager/api/CancellableTask.java
@@ -0,0 +1,15 @@
+package org.openslx.taskmanager.api;
+
+/**
+ * Implement this if you want your task to be cancellable.
+ * After cancel has been called, your task should try to clean up and leave
+ * its execute() method in a timely fashion.
+ * The execute() method must return false in that case (unless
+ * it could still do everything it was supposed to)
+ */
+public interface CancellableTask
+{
+
+ public void cancel();
+
+}