KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > workqueue > WorkQueueManager


1 package org.objectweb.celtix.workqueue;
2
3 public interface WorkQueueManager {
4
5     enum ThreadingModel {
6         SINGLE_THREADED, MULTI_THREADED
7     };
8
9     /**
10      * Get the manager's work queue.
11      * @return AutomaticWorkQueue
12      */

13     AutomaticWorkQueue getAutomaticWorkQueue();
14
15     /**
16      * Get the threading model.
17      * @return ThreadingModel - either <code>SINGLE_THREADED</code>
18      * or <code>MULTI_THREADED</code>.
19      */

20     ThreadingModel getThreadingModel();
21
22     /**
23      * Set the threading model.
24      * @param model either <code>SINGLE_THREADED</code>
25      * or <code>MULTI_THREADED</code>.
26      */

27     void setThreadingModel(ThreadingModel model);
28     
29     /**
30      * Shuts down the manager's work queue. If
31      * <code>processRemainingTasks</code> is true, waits for the work queue to
32      * shutdown before returning.
33      * @param processRemainingTasks - whether or not to wait for completion
34      */

35     void shutdown(boolean processRemainingTasks);
36     
37     /**
38      * Only returns after workqueue has been shutdown.
39      *
40      */

41     void run();
42 }
43
Popular Tags