org.apache.geronimo.gshell.common
Class NamedThreadFactory

java.lang.Object
  extended by org.apache.geronimo.gshell.common.NamedThreadFactory
All Implemented Interfaces:
ThreadFactory

public class NamedThreadFactory
extends Object
implements ThreadFactory

A ThreadFactory which automatically generates thread names based off of a pre-configured basename passed in during construction and a unique index.

Version:
$Rev: 578527 $ $Date: 2007-09-22 16:35:08 -0700 (Sat, 22 Sep 2007) $

Constructor Summary
NamedThreadFactory(Class type)
           
NamedThreadFactory(Class type, String suffix)
           
NamedThreadFactory(String baseName)
           
NamedThreadFactory(String baseName, ThreadGroup group)
           
 
Method Summary
protected  void configure(Thread t)
           
protected  String createName()
           
 long current()
           
 String getBaseName()
           
 ThreadGroup getGroup()
           
 Thread newThread(Runnable task)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedThreadFactory

public NamedThreadFactory(String baseName,
                          ThreadGroup group)

NamedThreadFactory

public NamedThreadFactory(String baseName)

NamedThreadFactory

public NamedThreadFactory(Class type)

NamedThreadFactory

public NamedThreadFactory(Class type,
                          String suffix)
Method Detail

getBaseName

public String getBaseName()

getGroup

public ThreadGroup getGroup()

current

public long current()

newThread

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

createName

protected String createName()

configure

protected void configure(Thread t)


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.