1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.services.threadpool;
18
19 import org.apache.turbine.services.Service;
20
21 /***
22 * <p>base interface for a simple ThreadPool</p>
23 *
24 * @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
25 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>
26 * @version $Id: ThreadPoolService.java,v 1.5 2004/02/23 03:51:31 jford Exp $
27 */
28 public interface ThreadPoolService extends Service {
29
30 public static final String SERVICE_NAME = "ThreadPool";
31
32 /***
33 * Put the Runnable object on the process queue of the threadpool.
34 * This process will be executed at defaut priority as soon as a
35 * thread is available
36 *
37 * @param runnable the Runnable object to process
38 */
39 public void process( Runnable runnable );
40
41 /***
42 * Put the Runnable object on the process queue of the threadpool.
43 * This process will be executed at the specified priority as soon as a
44 * thread is available
45 *
46 * @param runnable the Runnable object to process
47 * @param priority the priority the process should run with
48 */
49 public void process( Runnable runnable, int priority );
50
51 }
52