Top Fields Constructors Methods
org.testng.internal.thread

public Class TestNGThreadFactory

extends Object
implements ThreadFactory
Class Inheritance
All Implemented Interfaces
java.util.concurrent.ThreadFactory
Imports
java.util.Collection, .Collections, .Set, .WeakHashMap, java.util.concurrent.ThreadFactory, java.util.concurrent.atomic.AtomicInteger, java.util.stream.Collectors

Field Summary

Modifier and TypeField and Description
private final String
private final AtomicInteger
private final Set<Thread>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Collection<Thread>
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

nameback to summary
private final String name
threadNumberback to summary
private final AtomicInteger threadNumber
threadsback to summary
private final Set<Thread> threads

Constructor Detail

TestNGThreadFactoryback to summary
public TestNGThreadFactory(String name)

Method Detail

getRunningThreadsback to summary
public Collection<Thread> getRunningThreads()
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