1 8 package org.codehaus.spice.netserve.connection.handlers; 9 10 import org.codehaus.spice.threadpool.ThreadControl; 11 12 17 class MockThreadControl 18 implements ThreadControl 19 { 20 private final Thread m_thread; 21 22 public MockThreadControl( Thread thread ) 23 { 24 m_thread = thread; 25 } 26 27 public void join( long milliSeconds ) 28 throws InterruptedException 29 { 30 m_thread.join( milliSeconds ); 31 } 32 33 public void interrupt() 34 throws IllegalStateException , SecurityException 35 { 36 m_thread.interrupt(); 37 } 38 39 public boolean isFinished() 40 { 41 return !m_thread.isAlive(); 42 } 43 44 public Throwable getThrowable() 45 { 46 return null; 47 } 48 } 49 | Popular Tags |