aboutsummaryrefslogtreecommitdiffstats
path: root/src/ru/olamedia/tasks/TaskManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ru/olamedia/tasks/TaskManager.java')
-rw-r--r--src/ru/olamedia/tasks/TaskManager.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ru/olamedia/tasks/TaskManager.java b/src/ru/olamedia/tasks/TaskManager.java
new file mode 100644
index 0000000..e1a637e
--- /dev/null
+++ b/src/ru/olamedia/tasks/TaskManager.java
@@ -0,0 +1,18 @@
+package ru.olamedia.tasks;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TaskManager {
+ private static List<Task> tasks = new ArrayList<Task>();
+
+ public static void add(Task task) {
+ tasks.add(task);
+ }
+
+ public static void stopAll() {
+ for (Task task : tasks) {
+ task.stop();
+ }
+ }
+}