diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..05fc58a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "maven" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: daily \ No newline at end of file diff --git a/proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/WasmPlugin.java b/proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/ProxyWasm.java similarity index 84% rename from proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/WasmPlugin.java rename to proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/ProxyWasm.java index 7b4bb2a..b6d9217 100644 --- a/proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/WasmPlugin.java +++ b/proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/ProxyWasm.java @@ -12,15 +12,15 @@ * *
Apply this annotation to JAX-RS resource classes or methods to enable filtering * by the Proxy-Wasm plugins identified by the names specified in the {@link #value()} attribute. - * The {@link WasmPluginFeature} must be registered for this annotation to have effect. + * The {@link ProxyWasmFeature} must be registered for this annotation to have effect. * - * @see WasmPluginFeature - * @see WasmPluginFilter + * @see ProxyWasmFeature + * @see ProxyWasmFilter */ @NameBinding @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD}) -public @interface WasmPlugin { +public @interface ProxyWasm { /** * Specifies the names of the Proxy-Wasm plugins that should filter the annotated * resource class or method. diff --git a/proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/WasmPluginFeature.java b/proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/ProxyWasmFeature.java similarity index 79% rename from proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/WasmPluginFeature.java rename to proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/ProxyWasmFeature.java index 014ccfa..8c0db1f 100644 --- a/proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/WasmPluginFeature.java +++ b/proxy-wasm-jaxrs/src/main/java/io/roastedroot/proxywasm/jaxrs/ProxyWasmFeature.java @@ -3,20 +3,20 @@ import io.roastedroot.proxywasm.PluginFactory; import io.roastedroot.proxywasm.StartException; import io.roastedroot.proxywasm.internal.ServerAdaptor; -import io.roastedroot.proxywasm.jaxrs.internal.AbstractWasmPluginFeature; +import io.roastedroot.proxywasm.jaxrs.internal.AbstractProxyWasmFeature; import java.util.Arrays; import java.util.List; /** * A JAX-RS {@link jakarta.ws.rs.core.Feature} that enables Proxy-Wasm plugin filtering - * for JAX-RS applications. This feature registers the necessary {@link WasmPluginFilter} - * to intercept requests and responses for resources annotated with {@link WasmPlugin}. + * for JAX-RS applications. This feature registers the necessary {@link ProxyWasmFilter} + * to intercept requests and responses for resources annotated with {@link ProxyWasm}. * *
To use this feature, register an instance of it with your JAX-RS application, providing * the required {@link ServerAdaptor} and a list of {@link PluginFactory} instances. * *
If you are using a CDI container like quarkus, you will be using the - * {@link io.roastedroot.proxywasm.jaxrs.cdi.WasmPluginFeature} instead. + * {@link io.roastedroot.proxywasm.jaxrs.cdi.ProxyWasmFeature} instead. * *
* public class MyApplication extends jakarta.ws.rs.core.Application {
@@ -34,24 +34,24 @@
* // Assuming a ServerAdaptor and PluginFactory are available
* ServerAdaptor serverAdaptor = ...;
* PluginFactory myPluginFactory = ...;
- * singletons.add(new WasmPluginFeature(serverAdaptor, myPluginFactory));
+ * singletons.add(new ProxyWasmFeature(serverAdaptor, myPluginFactory));
* } catch (StartException e) {
- * throw new RuntimeException("Failed to initialize WasmPluginFeature", e);
+ * throw new RuntimeException("Failed to initialize ProxyWasmFeature", e);
* }
* return singletons;
* }
* }
*
*
- * @see WasmPlugin
- * @see WasmPluginFilter
+ * @see ProxyWasm
+ * @see ProxyWasmFilter
* @see PluginFactory
* @see ServerAdaptor
*/
-public class WasmPluginFeature extends AbstractWasmPluginFeature {
+public class ProxyWasmFeature extends AbstractProxyWasmFeature {
/**
- * Constructs a new WasmPluginFeature.
+ * Constructs a new ProxyWasmFeature.
*
* @param httpServer The {@link ServerAdaptor} used to adapt JAX-RS specific request/response
* objects for the Proxy-Wasm host.
@@ -60,13 +60,13 @@ public class WasmPluginFeature extends AbstractWasmPluginFeature {
* @throws StartException If an error occurs during the initialization or startup of the
* underlying Proxy-Wasm plugins.
*/
- public WasmPluginFeature(ServerAdaptor httpServer, PluginFactory... factories)
+ public ProxyWasmFeature(ServerAdaptor httpServer, PluginFactory... factories)
throws StartException {
this(httpServer, Arrays.asList(factories));
}
/**
- * Constructs a new WasmPluginFeature with a list of factories.
+ * Constructs a new ProxyWasmFeature with a list of factories.
*
* @param httpServer The {@link ServerAdaptor} used to adapt JAX-RS specific request/response
* objects for the Proxy-Wasm host.
@@ -75,7 +75,7 @@ public WasmPluginFeature(ServerAdaptor httpServer, PluginFactory... factories)
* @throws StartException If an error occurs during the initialization or startup of the
* underlying Proxy-Wasm plugins.
*/
- public WasmPluginFeature(ServerAdaptor httpServer, ListThis filter is registered by the {@link WasmPluginFeature}. It interacts with + *
This filter is registered by the {@link ProxyWasmFeature}. It interacts with
* {@link Plugin} instances obtained from configured {@link Pool}s to execute the
* appropriate Proxy-Wasm ABI functions (e.g., {@code on_http_request_headers},
* {@code on_http_response_body}) at different stages of the JAX-RS request/response lifecycle.
*
- * @see WasmPluginFeature
- * @see WasmPlugin
+ * @see ProxyWasmFeature
+ * @see ProxyWasm
* @see Plugin
*/
-public class WasmPluginFilter
+public class ProxyWasmFilter
implements ContainerRequestFilter, WriterInterceptor, ContainerResponseFilter {
private static final String FILTER_CONTEXT = PluginHttpContext.class.getName() + ".context";
- private static final Logger LOGGER = Logger.getLogger(WasmPluginFilter.class.getName());
+ private static final Logger LOGGER = Logger.getLogger(ProxyWasmFilter.class.getName());
private final List Note: This class is intended for use in CDI environments. If you are not using CDI, you can
- * use the {@link io.roastedroot.proxywasm.jaxrs.WasmPluginFeature} class directly to register the
+ * use the {@link io.roastedroot.proxywasm.jaxrs.ProxyWasmFeature} class directly to register the
* feature with your JAX-RS application.
*
- * @see io.roastedroot.proxywasm.jaxrs.WasmPluginFeature
- * @see io.roastedroot.proxywasm.jaxrs.WasmPluginFilter
+ * @see io.roastedroot.proxywasm.jaxrs.ProxyWasmFeature
+ * @see ProxyWasmFilter
* @see PluginFactory
* @see ServerAdaptor
* @see Provider
@@ -40,19 +41,19 @@
*/
@Provider
@ApplicationScoped
-public class WasmPluginFeature extends AbstractWasmPluginFeature {
+public class ProxyWasmFeature extends AbstractProxyWasmFeature {
@Inject Instance