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.TurbineServices;
20
21 /***
22 * This is a simple static accessor class to the access the common
23 * methods of JetspeedThreadPoolService
24 *
25 * @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
26 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>
27 * @version $Id: ThreadPool.java,v 1.4 2004/02/23 03:51:31 jford Exp $
28 */
29 public class ThreadPool
30 {
31
32 /***
33 * @see org.apache.jetspeed.services.threadpool.JetspeedThreadPoolService#process( Runnable runnable )
34 */
35 public static void process( Runnable runnable ) {
36
37 JetspeedThreadPoolService service =
38 (JetspeedThreadPoolService) TurbineServices
39 .getInstance()
40 .getService( ThreadPoolService.SERVICE_NAME );
41
42 service.process( runnable );
43
44 }
45
46 /***
47 * @see org.apache.jetspeed.services.threadpool.JetspeedThreadPoolService#process( Runnable runnable, int priority )
48 */
49 public static void process( Runnable runnable, int priority ) {
50
51 JetspeedThreadPoolService service =
52 (JetspeedThreadPoolService) TurbineServices
53 .getInstance()
54 .getService( ThreadPoolService.SERVICE_NAME );
55
56 service.process( runnable, priority );
57
58 }
59
60 }