Package org.drools.spi

Source Code of org.drools.spi.ExecutorServiceFactory

package org.drools.spi;

import org.drools.concurrent.ExecutorService;
import org.drools.util.ClassUtils;

/**
* Factory class that will return a ExecutorService based on the provided string className
*
*/
public class ExecutorServiceFactory {
   
    public static ExecutorService createExecutorService(String className) {       

        try {
            ExecutorService service = ( ExecutorService ) ClassUtils.instantiateObject( className );
           
            return service;           
        } catch ( Throwable e ) {
            throw new RuntimeException("Unable to instantiate ExecutorService '" + className + "'", e );
        }       
    }

}
TOP

Related Classes of org.drools.spi.ExecutorServiceFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.