org.d_haven.event.command

Class GroupedThreadFactory

public class GroupedThreadFactory extends Object implements ThreadFactory

The GroupedThreadFactory is a convenience implementation for the concurrent utilitie's ThreadFactory. It will allow you to use only threads created as part of a ThreadGroup, as well as ensure that those threads are Daemon threads with a low priority.
Field Summary
ThreadGroupm_group
intm_number
Constructor Summary
GroupedThreadFactory()
Create a GroupedThreadFactory with the current thread's ThreadGroup.
GroupedThreadFactory(ThreadGroup group)
Create a GroupedThreadFactory with the ThreadGroup supplied.
Method Summary
ThreadnewThread(Runnable runnable)
StringtoString()

Field Detail

m_group

private ThreadGroup m_group

m_number

private int m_number

Constructor Detail

GroupedThreadFactory

public GroupedThreadFactory()
Create a GroupedThreadFactory with the current thread's ThreadGroup.

GroupedThreadFactory

public GroupedThreadFactory(ThreadGroup group)
Create a GroupedThreadFactory with the ThreadGroup supplied.

Parameters: group the ThreadGroup to use for all new threads

Method Detail

newThread

public Thread newThread(Runnable runnable)

toString

public String toString()