org.apache.sling.commons.threads.impl
Class ExtendedThreadFactory

java.lang.Object
  extended by org.apache.sling.commons.threads.impl.ExtendedThreadFactory
All Implemented Interfaces:
java.util.concurrent.ThreadFactory

public final class ExtendedThreadFactory
extends Object
implements java.util.concurrent.ThreadFactory

This class is responsible to create new Thread instances. It's a very basic implementation.


Constructor Summary
ExtendedThreadFactory(java.util.concurrent.ThreadFactory factory, ThreadPoolConfig.ThreadPriority priority, boolean isDaemon)
          Create a new wrapper for a thread factory handling the
 
Method Summary
 Thread newThread(Runnable command)
          Invoke the thread factory and set the daemon flag and priority.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedThreadFactory

public ExtendedThreadFactory(java.util.concurrent.ThreadFactory factory,
                             ThreadPoolConfig.ThreadPriority priority,
                             boolean isDaemon)
Create a new wrapper for a thread factory handling the

Parameters:
priority - A non null value.
isDaemon - Whether new Threads should run as daemons.
Method Detail

newThread

public Thread newThread(Runnable command)
Invoke the thread factory and set the daemon flag and priority.

Specified by:
newThread in interface java.util.concurrent.ThreadFactory
See Also:
ThreadFactory.newThread(java.lang.Runnable)


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.