org.apache.mina.common
Class PooledThreadModel

java.lang.Object
  extended by org.apache.mina.common.PooledThreadModel
All Implemented Interfaces:
IoFilterChainBuilder, ThreadModel

public class PooledThreadModel
extends Object
implements ThreadModel

A ThreadModel which represents a thread model with an independant thread pool per service.

Please note that reusing an instance of this model means a thread pool is shared among multiple services. If don't want to shared a thread pool, please create each instance of this model whenever you bind a service or connect to a remote service.

Version:
$Rev: 391231 $, $Date: 2006-04-04 15:21:55 +0900 (Tue, 04 Apr 2006) $
Author:
The Apache Directory Project (mina-dev@directory.apache.org)

Field Summary
static int DEFAULT_KEEP_ALIVE_TIME
           
static int DEFAULT_MAXIMUM_POOL_SIZE
           
 
Fields inherited from interface org.apache.mina.common.ThreadModel
MANUAL
 
Fields inherited from interface org.apache.mina.common.IoFilterChainBuilder
NOOP
 
Constructor Summary
PooledThreadModel()
           
PooledThreadModel(int maxThreads)
           
PooledThreadModel(String threadNamePrefix)
           
PooledThreadModel(String threadNamePrefix, int maxThreads)
           
 
Method Summary
 void buildFilterChain(IoFilterChain chain)
          Modifies the specified chain.
 int getKeepAliveTime()
           
 int getMaximumPoolSize()
           
 String getThreadNamePrefix()
           
 void setKeepAliveTime(int keepAliveTime)
           
 void setMaximumPoolSize(int maximumPoolSize)
           
 void setThreadNamePrefix(String threadNamePrefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAXIMUM_POOL_SIZE

public static final int DEFAULT_MAXIMUM_POOL_SIZE
See Also:
ThreadPoolFilter.DEFAULT_MAXIMUM_POOL_SIZE, Constant Field Values

DEFAULT_KEEP_ALIVE_TIME

public static final int DEFAULT_KEEP_ALIVE_TIME
See Also:
ThreadPoolFilter.DEFAULT_KEEP_ALIVE_TIME, Constant Field Values
Constructor Detail

PooledThreadModel

public PooledThreadModel()

PooledThreadModel

public PooledThreadModel(int maxThreads)

PooledThreadModel

public PooledThreadModel(String threadNamePrefix)

PooledThreadModel

public PooledThreadModel(String threadNamePrefix,
                         int maxThreads)
Method Detail

getThreadNamePrefix

public String getThreadNamePrefix()

setThreadNamePrefix

public void setThreadNamePrefix(String threadNamePrefix)

getMaximumPoolSize

public int getMaximumPoolSize()

getKeepAliveTime

public int getKeepAliveTime()

setMaximumPoolSize

public void setMaximumPoolSize(int maximumPoolSize)

setKeepAliveTime

public void setKeepAliveTime(int keepAliveTime)

buildFilterChain

public void buildFilterChain(IoFilterChain chain)
                      throws Exception
Description copied from interface: IoFilterChainBuilder
Modifies the specified chain.

Specified by:
buildFilterChain in interface IoFilterChainBuilder
Throws:
Exception