-
- All Known Implementing Classes:
DefaultThreadFactory
public interface ThreadFactoryTheThreadFactorydescribes a factory for threads of execution modeled asWorkerTasks.- Since:
- 1.9
- Version:
- 1.9
- Author:
- Frank Fock
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WorkerTaskcreateWorkerThread(java.lang.String name, WorkerTask task, boolean daemon)Creates a new thread of execution for the supplied task.
-
-
-
Method Detail
-
createWorkerThread
WorkerTask createWorkerThread(java.lang.String name, WorkerTask task, boolean daemon)
Creates a new thread of execution for the supplied task. The returnedWorkerTaskis a symmetric wrapper for the supplied one. When the returned task is being run, the supplied one will be executed in a new thread of execution until it either terminates or theWorkerTask.terminate()method has been called.- Parameters:
name- the name of the execution thread.task- the task to be executed in the new thread.daemon- indicates whether the new thread is a daemon (trueor an user thread (false).- Returns:
- the
WorkerTaskwrapper to control start and termination of the thread.
-
-