org.d_haven.event.command
Class GroupedThreadFactory
java.lang.Object
org.d_haven.event.command.GroupedThreadFactory
- All Implemented Interfaces:
- EDU.oswego.cs.dl.util.concurrent.ThreadFactory
public class GroupedThreadFactory
- extends java.lang.Object
- implements EDU.oswego.cs.dl.util.concurrent.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.
Constructor Summary |
GroupedThreadFactory()
Create a GroupedThreadFactory with the current thread's
ThreadGroup. |
GroupedThreadFactory(java.lang.ThreadGroup group)
Create a GroupedThreadFactory with the ThreadGroup supplied. |
Method Summary |
java.lang.Thread |
newThread(java.lang.Runnable runnable)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
m_group
private java.lang.ThreadGroup m_group
m_number
private int m_number
GroupedThreadFactory
public GroupedThreadFactory()
- Create a GroupedThreadFactory with the current thread's
ThreadGroup.
GroupedThreadFactory
public GroupedThreadFactory(java.lang.ThreadGroup group)
- Create a GroupedThreadFactory with the ThreadGroup supplied.
- Parameters:
group
- the ThreadGroup to use for all new threads
newThread
public java.lang.Thread newThread(java.lang.Runnable runnable)
- Specified by:
newThread
in interface EDU.oswego.cs.dl.util.concurrent.ThreadFactory
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object