org.apache.cocoon.components.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:
CVS $Id: ThreadFactory.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Giacomo Pati

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

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

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

isDaemon

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

Returns:
Whether new Threads should run as daemons.

setPriority

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

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

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

newThread

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-2010 The Apache Software Foundation. All Rights Reserved.