Package EDU.oswego.cs.dl.util.concurrent
Class ThreadFactoryUser
- java.lang.Object
-
- EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser
-
- Direct Known Subclasses:
ClockDaemon,PooledExecutor,QueuedExecutor,SwingWorker,ThreadedExecutor,TimedCallable
public class ThreadFactoryUser extends Object
Base class for Executors and related classes that rely on thread factories. Generally intended to be used as a mixin-style abstract class, but can also be used stand-alone.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classThreadFactoryUser.DefaultThreadFactory
-
Field Summary
Fields Modifier and Type Field Description protected ThreadFactorythreadFactory_
-
Constructor Summary
Constructors Constructor Description ThreadFactoryUser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThreadFactorygetThreadFactory()Get the factory for creating new threads.ThreadFactorysetThreadFactory(ThreadFactory factory)Set the factory for creating new threads.
-
-
-
Field Detail
-
threadFactory_
protected ThreadFactory threadFactory_
-
-
Method Detail
-
setThreadFactory
public ThreadFactory setThreadFactory(ThreadFactory factory)
Set the factory for creating new threads. By default, new threads are created without any special priority, threadgroup, or status parameters. You can use a different factory to change the kind of Thread class used or its construction parameters.- Parameters:
factory- the factory to use- Returns:
- the previous factory
-
getThreadFactory
public ThreadFactory getThreadFactory()
Get the factory for creating new threads.
-
-