org.springframework.scheduling.concurrent
Class CustomizableThreadFactory

java.lang.Object
  extended by org.springframework.util.CustomizableThreadCreator
      extended by org.springframework.scheduling.concurrent.CustomizableThreadFactory
All Implemented Interfaces:
ThreadFactory
Direct Known Subclasses:
ThreadPoolTaskExecutor

public class CustomizableThreadFactory
extends CustomizableThreadCreator
implements ThreadFactory

Implementation of the JDK 1.5 ThreadFactory interface, allowing for customizing the created threads (name, priority, etc).

See the base class CustomizableThreadCreator for details on the available configuration options.

Since:
2.0.3
Author:
Juergen Hoeller
See Also:
CustomizableThreadCreator.setThreadNamePrefix(java.lang.String), CustomizableThreadCreator.setThreadPriority(int)

Constructor Summary
CustomizableThreadFactory()
          Create a new CustomizableThreadFactory with default thread name prefix.
CustomizableThreadFactory(String threadNamePrefix)
          Create a new CustomizableThreadFactory with the given thread name prefix.
 
Method Summary
 Thread newThread(Runnable runnable)
           
 
Methods inherited from class org.springframework.util.CustomizableThreadCreator
createThread, getDefaultThreadNamePrefix, getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, nextThreadName, setDaemon, setThreadGroup, setThreadGroupName, setThreadNamePrefix, setThreadPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomizableThreadFactory

public CustomizableThreadFactory()
Create a new CustomizableThreadFactory with default thread name prefix.


CustomizableThreadFactory

public CustomizableThreadFactory(String threadNamePrefix)
Create a new CustomizableThreadFactory with the given thread name prefix.

Parameters:
threadNamePrefix - the prefix to use for the names of newly created threads
Method Detail

newThread

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


Copyright © 2002-2008 The Spring Framework.