de.root1.simon
Class NamedThreadPoolFactory

java.lang.Object
  extended by de.root1.simon.NamedThreadPoolFactory
All Implemented Interfaces:
java.util.concurrent.ThreadFactory

public class NamedThreadPoolFactory
extends java.lang.Object
implements java.util.concurrent.ThreadFactory

A factory-class that let's you use named threads in a thread-pool

Author:
achristian

Constructor Summary
protected NamedThreadPoolFactory(java.lang.String baseName)
          Creates a new thread-factory that gives each thread a basename
 
Method Summary
 java.lang.Thread newThread(java.lang.Runnable r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedThreadPoolFactory

protected NamedThreadPoolFactory(java.lang.String baseName)
Creates a new thread-factory that gives each thread a basename

Parameters:
baseName - the basename for the created threads
Method Detail

newThread

public java.lang.Thread newThread(java.lang.Runnable r)
Specified by:
newThread in interface java.util.concurrent.ThreadFactory


Copyright © 2011. All Rights Reserved.