Introduce UX scheduler
[lgpl/argeo-commons.git] / org.argeo.api.cms / src / org / argeo / api / cms / ux / CmsView.java
index 121e4bdcbf601a654fc608aeda89ec895f4b4e3b..b231bea9935dd2b478bb054134243243858b8cbb 100644 (file)
@@ -3,6 +3,7 @@ package org.argeo.api.cms.ux;
 import java.net.URI;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.TimerTask;
 import java.util.concurrent.Callable;
 import java.util.concurrent.Executors;
 
@@ -100,4 +101,10 @@ public interface CmsView {
                throw new UnsupportedOperationException();
        }
 
+       /** Schedule a one-shot UX task to be executed within the UX context/thread. */
+       TimerTask schedule(Runnable task, long delay);
+
+       /** Schedule a recurring UX task to be executed within the UX context/thread. */
+       TimerTask schedule(Runnable task, long delay, long period);
+
 }