Top Description Fields Constructors Methods
org.apache.tomcat.util.threads

public Class TaskThreadFactory

extends Object
implements ThreadFactory
Class Inheritance
All Implemented Interfaces
java.util.concurrent.ThreadFactory
Imports
java.security.AccessController, .PrivilegedAction, java.util.concurrent.ThreadFactory, java.util.concurrent.atomic.AtomicInteger, org.apache.tomcat.util.security.PrivilegedSetAccessControlContext, .PrivilegedSetTccl

Simple task thread factory to use to create threads for an executor implementation.

Field Summary

Modifier and TypeField and Description
private final boolean
private final ThreadGroup
private final String
private final AtomicInteger
private final int

Constructor Summary

AccessConstructor and Description
public
TaskThreadFactory(String namePrefix, boolean daemon, int priority)

Method Summary

Modifier and TypeMethod and Description
public Thread
newThread(Runnable
a runnable to be executed by new thread instance
r
)

Implements java.util.concurrent.ThreadFactory.newThread.

Constructs a new unstarted Thread to run the given runnable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

daemonback to summary
private final boolean daemon
groupback to summary
private final ThreadGroup group
namePrefixback to summary
private final String namePrefix
threadNumberback to summary
private final AtomicInteger threadNumber
threadPriorityback to summary
private final int threadPriority

Constructor Detail

TaskThreadFactoryback to summary
public TaskThreadFactory(String namePrefix, boolean daemon, int priority)

Method Detail

newThreadback to summary
public Thread newThread(Runnable r)

Implements java.util.concurrent.ThreadFactory.newThread.

Doc from java.util.concurrent.ThreadFactory.newThread.

Constructs a new unstarted Thread to run the given runnable.

Parameters
r:Runnable

a runnable to be executed by new thread instance

Returns:Thread

constructed thread, or null if the request to create a thread is rejected

Annotations
@Override