Package org.tamacat.httpd.util

Examples of org.tamacat.httpd.util.DefaultThreadFactory


   * of {@code ExecutorService}.
   * @return {@link ThreadPoolExecutor}
   */
  public ExecutorService getExecutorService(int maxThreads) {
    if (maxThreads > 0) {
      return Executors.newFixedThreadPool(maxThreads, new DefaultThreadFactory(threadName));
    } else {
      return Executors.newCachedThreadPool(new DefaultThreadFactory(threadName));
    }
  }
View Full Code Here


    for (ReverseUrl url : reverseUrls) {
      HttpMonitor<ReverseUrl> monitor = new HttpMonitor<ReverseUrl>();
      monitor.setHealthCheckTarget(this);
      monitor.setMonitorConfig(getMonitorConfig(url));
      monitor.setTarget(url);
      new DefaultThreadFactory("Monitor").newThread(monitor).start();
      monitor.startMonitor();
    }
  }
View Full Code Here

TOP

Related Classes of org.tamacat.httpd.util.DefaultThreadFactory

Copyright © 2018 www.massapicom. 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.