1 17 package org.apache.geronimo.jetty6; 18 19 import org.mortbay.thread.ThreadPool; 20 21 28 public class JettyThreadPool implements ThreadPool { 29 30 private org.apache.geronimo.pool.ThreadPool geronimoThreadPool; 31 32 public JettyThreadPool(org.apache.geronimo.pool.ThreadPool geronimoThreadPool) { 33 this.geronimoThreadPool = geronimoThreadPool; 34 } 35 36 37 public boolean dispatch(Runnable work) { 38 this.geronimoThreadPool.execute(work); 39 return true; 40 } 50 51 57 public void join() throws InterruptedException { 58 throw new UnsupportedOperationException ("join not supported"); 59 } 60 61 public int getThreads() { 62 return this.geronimoThreadPool.getPoolSize(); 63 } 64 65 public int getIdleThreads() { 66 return 0; 68 } 69 70 public boolean isLowOnThreads() { 71 return false; 73 } 74 75 } 76 | Popular Tags |