io.github.factoryfx.jetty.ThreadPoolFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jettyFactory Show documentation
Show all versions of jettyFactory Show documentation
factoryfx dependency injection framework
package io.github.factoryfx.jetty;
import io.github.factoryfx.factory.FactoryBase;
import io.github.factoryfx.factory.attribute.primitive.IntegerAttribute;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.eclipse.jetty.util.thread.ThreadPool;
public class ThreadPoolFactory> extends FactoryBase {
public final IntegerAttribute poolSize = new IntegerAttribute().labelText("Pool size");
public ThreadPoolFactory() {
configLifeCycle().setCreator(() -> new QueuedThreadPool(poolSize.get()));
}
}