01: /*
02: * Copyright (C) The Spice Group. All rights reserved.
03: *
04: * This software is published under the terms of the Spice
05: * Software License version 1.1, a copy of which has been included
06: * with this distribution in the LICENSE.txt file.
07: */
08: package org.codehaus.spice.netserve.connection.handlers;
09:
10: import org.codehaus.spice.threadpool.ThreadPool;
11: import org.codehaus.spice.threadpool.ThreadControl;
12: import org.codehaus.spice.threadpool.Executable;
13:
14: /**
15: *
16: * @author Peter Donald
17: * @version $Revision: 1.2 $ $Date: 2004/03/21 23:42:59 $
18: */
19: class MockThreadPool implements ThreadPool {
20: public ThreadControl execute(Runnable work) {
21: final Thread thread = new Thread(work);
22: thread.start();
23: return new MockThreadControl(thread);
24: }
25:
26: public ThreadControl execute(Executable work) {
27: return null;
28: }
29: }
|