org.specrunner.junit
Class NamedFactory

java.lang.Object
  extended by org.specrunner.junit.NamedFactory
All Implemented Interfaces:
ThreadFactory

public class NamedFactory
extends Object
implements ThreadFactory

Factory of threads named.

Author:
Mathieu Carbou (mathieu.carbou@gmail.com)

Field Summary
protected  ThreadGroup group
          Thread group.
protected  AtomicInteger poolNumber
          Pool number.
protected  AtomicInteger threadNumber
          Thread number.
 
Constructor Summary
NamedFactory(String poolName)
          Friendly constructor.
 
Method Summary
 Thread newThread(Runnable r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

poolNumber

protected final AtomicInteger poolNumber
Pool number.


threadNumber

protected final AtomicInteger threadNumber
Thread number.


group

protected final ThreadGroup group
Thread group.

Constructor Detail

NamedFactory

public NamedFactory(String poolName)
Friendly constructor.

Parameters:
poolName - The pool name.
Method Detail

newThread

public Thread newThread(Runnable r)
Specified by:
newThread in interface ThreadFactory


Copyright © 2015. All rights reserved.