1 /***
2 *
3 */
4 package com.eviware.soapui.monitor;
5
6 import java.util.concurrent.TimeUnit;
7
8 import org.mortbay.thread.ThreadPool;
9
10 import com.eviware.soapui.SoapUI;
11
12
13
14
15
16
17
18
19
20
21
22
23
24 public final class SoapUIJettyThreadPool implements ThreadPool
25 {
26 @Override
27 public boolean dispatch( Runnable arg0 )
28 {
29 SoapUI.getThreadPool().execute( arg0 );
30 return true;
31 }
32
33 @Override
34 public int getIdleThreads()
35 {
36 return 0;
37 }
38
39 @Override
40 public int getThreads()
41 {
42 return SoapUI.getThreadPool().getActiveCount();
43 }
44
45 @Override
46 public boolean isLowOnThreads()
47 {
48 return false;
49 }
50
51 @Override
52 public void join() throws InterruptedException
53 {
54 SoapUI.getThreadPool().awaitTermination( 30, TimeUnit.SECONDS );
55 }
56 }