creates a new threadpoolexecutor to serve the agi requests . the nature of this pool defines how many concurrent requests can be handled . the default implementation returns a dynamic thread pool defined by the poolsize and maximumpoolsize properties . you can override this method to change this behavior . for example you can use a cached pool with return executors.newcachedthreadpool new daemonthreadfactory ; concode_field_sep Log logger concode_elem_sep int DEFAULT_POOL_SIZE concode_elem_sep ThreadPoolExecutor pool concode_elem_sep boolean die concode_elem_sep int maximumPoolSize concode_elem_sep AgiChannelFactory agiChannelFactory concode_elem_sep int DEFAULT_MAXIMUM_POOL_SIZE concode_elem_sep MappingStrategy mappingStrategy concode_elem_sep int poolSize concode_field_sep int getPoolActiveThreadCount concode_elem_sep void setMaximumPoolSize concode_elem_sep int getPoolSize concode_elem_sep int getPoolActiveTaskCount concode_elem_sep boolean isDie concode_elem_sep void execute concode_elem_sep int getMaximumPoolSize concode_elem_sep void setPoolSize concode_elem_sep void handleException concode_elem_sep ThreadPoolExecutor getPool concode_elem_sep AgiChannelFactory getAgiChannelFactory concode_elem_sep void setMappingStrategy concode_elem_sep MappingStrategy getMappingStrategy concode_elem_sep void finalize concode_elem_sep void shutdown
ThreadPoolExecutor function ( ) { return new ThreadPoolExecutor ( poolSize , ( maximumPoolSize < poolSize ) ? poolSize : maximumPoolSize , 50000L , TimeUnit . MILLISECONDS , new SynchronousQueue < Runnable > ( ) , new DaemonThreadFactory ( ) ) ; }