io.github.factoryfx.jetty.HandlerCollectionFactory Maven / Gradle / Ivy
package io.github.factoryfx.jetty;
import io.github.factoryfx.factory.FactoryBase;
import io.github.factoryfx.factory.PolymorphicFactoryBase;
import io.github.factoryfx.factory.attribute.dependency.FactoryPolymorphicListAttribute;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.handler.HandlerCollection;
public class HandlerCollectionFactory> extends PolymorphicFactoryBase {
public final FactoryPolymorphicListAttribute handlers = new FactoryPolymorphicListAttribute(Handler.class).labelText("Handlers");
@Override
public HandlerCollection createImpl() {
return new HandlerCollection(true,handlers.instances().toArray(new Handler[0]));
}
public HandlerCollectionFactory(){
this.configLifeCycle().setUpdater(handlerCollection -> handlerCollection.setHandlers(handlers.instances().toArray(new Handler[0])));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy