diff options
Diffstat (limited to 'src/main/java/io/trygvis/queue/AsyncService.java')
-rwxr-xr-x | src/main/java/io/trygvis/queue/AsyncService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/io/trygvis/queue/AsyncService.java b/src/main/java/io/trygvis/queue/AsyncService.java index dcbe991..de0a1af 100755 --- a/src/main/java/io/trygvis/queue/AsyncService.java +++ b/src/main/java/io/trygvis/queue/AsyncService.java @@ -4,7 +4,7 @@ import org.quartz.*; public interface AsyncService<QueueRef extends AsyncService.QueueRef, ExecutionRef extends AsyncService.ExecutionRef> {
- void registerQueue(String name, int interval, Class klass) throws SchedulerException;
+ void registerQueue(String name, int interval, AsyncCallable callable) throws SchedulerException;
QueueRef getQueue(String name);
@@ -15,4 +15,8 @@ public interface AsyncService<QueueRef extends AsyncService.QueueRef, ExecutionR interface ExecutionRef {
}
+
+ interface AsyncCallable {
+ void run() throws Exception;
+ }
}
|