org.jboss.remoting.util
Class NamingThreadFactory
java.lang.Object
org.jboss.remoting.util.NamingThreadFactory
- All Implemented Interfaces:
- ThreadFactory
public final class NamingThreadFactory
- extends Object
- implements ThreadFactory
A wrapper ThreadFactory that gives the threads a sensible name.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NamingThreadFactory
public NamingThreadFactory(ThreadFactory delegate,
String namePattern)
- Create a new instance. The pattern is a format string such as one would provide to
String.format(String, Object[]). The format string should contain one %s which will be replaced
with the original thread name.
- Parameters:
delegate - the thread factory to actually use to produce the threadnamePattern - the name pattern to apply
newThread
public Thread newThread(Runnable r)
- Specified by:
newThread in interface ThreadFactory
Copyright © 2008 JBoss, a division of Red Hat, Inc.