com.continuent.tungsten.common.concurrent
Class SimpleThreadFactory

java.lang.Object
  extended by com.continuent.tungsten.common.concurrent.SimpleThreadFactory
All Implemented Interfaces:
java.util.concurrent.ThreadFactory

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

This class implements a thread factory used to create threads for the SimpleThreadService class. The main thing the factory does is ensure threads are properly named.

Author:
Robert Hodges

Constructor Summary
SimpleThreadFactory(java.lang.String prefix)
          Creates a new thread factory with a prefix for thread names.
 
Method Summary
 java.lang.Thread newThread(java.lang.Runnable runnable)
          Creates a new thread with proper name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleThreadFactory

public SimpleThreadFactory(java.lang.String prefix)
Creates a new thread factory with a prefix for thread names.

Parameters:
prefix - Thread prefix
Method Detail

newThread

public java.lang.Thread newThread(java.lang.Runnable runnable)
Creates a new thread with proper name.

Specified by:
newThread in interface java.util.concurrent.ThreadFactory
See Also:
ThreadFactory.newThread(java.lang.Runnable)