org.exolab.jms.common.threads
Class DefaultThreadPoolFactory

java.lang.Object
  |
  +--org.exolab.jms.common.threads.DefaultThreadPoolFactory
All Implemented Interfaces:
ThreadPoolFactory

public class DefaultThreadPoolFactory
extends java.lang.Object
implements ThreadPoolFactory

Default ThreadPoolFactory implementation that enables a ThreadListener to be associated with each pool.

Version:
$Revision: 1.1 $ $Date: 2006/02/23 11:07:05 $
Author:
Tim Anderson

Constructor Summary
DefaultThreadPoolFactory(ThreadListener listener)
          Construct a new DefaultThreadPoolFactory.
 
Method Summary
 EDU.oswego.cs.dl.util.concurrent.PooledExecutor create(java.lang.String name, EDU.oswego.cs.dl.util.concurrent.Channel channel, int maxPoolSize)
          Construct a new ThreadPool.
 EDU.oswego.cs.dl.util.concurrent.PooledExecutor create(java.lang.String name, int maxPoolSize)
          Construct a new PooledExecutor.
protected  ThreadPool init(ThreadPool pool)
          Initialises a pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultThreadPoolFactory

public DefaultThreadPoolFactory(ThreadListener listener)
Construct a new DefaultThreadPoolFactory.
Parameters:
listener - the thread listener. May be null
Method Detail

create

public EDU.oswego.cs.dl.util.concurrent.PooledExecutor create(java.lang.String name,
                                                              int maxPoolSize)
Construct a new PooledExecutor.
Specified by:
create in interface ThreadPoolFactory
Parameters:
name - the name to assign the thread group and worker threads
maxPoolSize - the maximum no. of threads to use

create

public EDU.oswego.cs.dl.util.concurrent.PooledExecutor create(java.lang.String name,
                                                              EDU.oswego.cs.dl.util.concurrent.Channel channel,
                                                              int maxPoolSize)
Construct a new ThreadPool.
Specified by:
create in interface ThreadPoolFactory
Parameters:
name - the name to assign the thread group and worker threads
channel - the channel for queueing
maxPoolSize - the maximum no. of threads to use

init

protected ThreadPool init(ThreadPool pool)
Initialises a pool.
Parameters:
pool - the pool to initialise
Returns:
the pool


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.