io.github.factoryfx.jetty.ServletAndPathFactory 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.SimpleFactoryBase;
import io.github.factoryfx.factory.attribute.dependency.FactoryPolymorphicAttribute;
import io.github.factoryfx.factory.attribute.types.StringAttribute;
import jakarta.servlet.Servlet;
public class ServletAndPathFactory> extends SimpleFactoryBase {
public final StringAttribute pathSpec = new StringAttribute().labelText("pathSpec");
public final FactoryPolymorphicAttribute servlet = new FactoryPolymorphicAttribute().labelText("servlets");
@Override
protected ServletAndPath createImpl() {
return new ServletAndPath(pathSpec.get(),servlet.instance());
}
public ServletAndPathFactory(){
this.config().setDisplayTextProvider(pathSpec::get);
}
}