org.apache.cocoon.thread
Interface ThreadFactory

All Superinterfaces:
EDU.oswego.cs.dl.util.concurrent.ThreadFactory

public interface ThreadFactory
extends EDU.oswego.cs.dl.util.concurrent.ThreadFactory

The ThreadFactory interface describes the responability of Factories creating Thread for ThreadPools of the RunnableManager

Version:
$Id: ThreadFactory.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Method Summary
 int getPriority()
          Get the priority newly created Threads will have
 boolean isDaemon()
          Get the daemon mode created Threads will have
 Thread newThread(Runnable command)
          Create a new Thread for a Runnable command
 void setDaemon(boolean isDaemon)
          Set the daemon mode of created Threads should have
 void setPriority(int priority)
          Set the priority newly created Threads should have
 

Method Detail

setDaemon

public void setDaemon(boolean isDaemon)
Set the daemon mode of created Threads should have

Parameters:
isDaemon - Whether new Threads should run as daemons.

isDaemon

public boolean isDaemon()
Get the daemon mode created Threads will have

Returns:
Whether new Threads should run as daemons.

setPriority

public void setPriority(int priority)
Set the priority newly created Threads should have

Parameters:
priority - One of Thread.MIN_PRIORITY, Thread.NORM_PRIORITY, Thread.MAX_PRIORITY

getPriority

public int getPriority()
Get the priority newly created Threads will have

Returns:
One of Thread.MIN_PRIORITY, Thread.NORM_PRIORITY, Thread.MAX_PRIORITY

newThread

public Thread newThread(Runnable command)
Create a new Thread for a Runnable command

Specified by:
newThread in interface EDU.oswego.cs.dl.util.concurrent.ThreadFactory
Parameters:
command - The Runnable
Returns:
new Thread


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.