KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > thread > ThreadPool


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.excalibur.thread;
9
10 import org.apache.avalon.framework.activity.Executable;
11
12 /**
13  * This class is the public frontend for the thread pool code.
14  *
15  * @author <a HREF="mailto:peter@apache.org">Peter Donald</a>
16  */

17 public interface ThreadPool
18 {
19     /**
20      * Run work in separate thread.
21      * Return a valid ThreadControl to control work thread.
22      *
23      * @param work the work to be executed.
24      * @return the ThreadControl
25      */

26     ThreadControl execute( Runnable JavaDoc work );
27
28     /**
29      * Run work in separate thread.
30      * Return a valid ThreadControl to control work thread.
31      *
32      * @param work the work to be executed.
33      * @return the ThreadControl
34      */

35     ThreadControl execute( Executable work );
36 }
37
Popular Tags