From 4d2cc0075ecf91855fc3870da11677fda54683b9 Mon Sep 17 00:00:00 2001 From: Julien Viet Date: Fri, 27 Sep 2024 17:01:03 +0200 Subject: [PATCH] JPMS support --- pom.xml | 5 -- src/main/asciidoc/enums.adoc | 46 ------------------- src/main/java/module-info.java | 6 +++ src/main/resources/META-INF/MANIFEST.MF | 2 - .../bridge/{ => tests}/BridgeOptionsTest.java | 6 ++- .../{ => tests}/PermittedOptionsTest.java | 5 +- src/test/java/module-info.java | 5 ++ .../ext/bridge/inheritance/MyBridgeOptions.kt | 32 ------------- 8 files changed, 18 insertions(+), 89 deletions(-) delete mode 100644 src/main/asciidoc/enums.adoc create mode 100644 src/main/java/module-info.java rename src/test/java/io/vertx/ext/bridge/{ => tests}/BridgeOptionsTest.java (96%) rename src/test/java/io/vertx/ext/bridge/{ => tests}/PermittedOptionsTest.java (96%) create mode 100644 src/test/java/module-info.java delete mode 100644 src/test/kotlin/io/vertx/kotlin/ext/bridge/inheritance/MyBridgeOptions.kt diff --git a/pom.xml b/pom.xml index 68a9068..58ec7a3 100644 --- a/pom.xml +++ b/pom.xml @@ -80,11 +80,6 @@ vertx-codegen processor - - io.vertx - vertx-docgen-processor - processor - diff --git a/src/main/asciidoc/enums.adoc b/src/main/asciidoc/enums.adoc deleted file mode 100644 index 64f2e90..0000000 --- a/src/main/asciidoc/enums.adoc +++ /dev/null @@ -1,46 +0,0 @@ -= Enums - -[[BridgeEventType]] -== BridgeEventType - -++++ - Bridge Event Types. -++++ -''' - -[cols=">25%,75%"] -[frame="topbot"] -|=== -^|Name | Description -|[[SOCKET_CREATED]]`SOCKET_CREATED`|+++ -This event will occur when a new SockJS socket is created. -+++ -|[[SOCKET_CLOSED]]`SOCKET_CLOSED`|+++ -This event will occur when a SockJS socket is closed. -+++ -|[[SOCKET_IDLE]]`SOCKET_IDLE`|+++ -This event will occur when SockJS socket is on idle for longer period of time than configured. -+++ -|[[SOCKET_PING]]`SOCKET_PING`|+++ -This event will occur when the last ping timestamp is updated for the SockJS socket. -+++ -|[[SEND]]`SEND`|+++ -This event will occur when a message is attempted to be sent from the client to the server. -+++ -|[[PUBLISH]]`PUBLISH`|+++ -This event will occur when a message is attempted to be published from the client to the server. -+++ -|[[RECEIVE]]`RECEIVE`|+++ -This event will occur when a message is attempted to be delivered from the server to the client. -+++ -|[[REGISTER]]`REGISTER`|+++ -This event will occur when a client attempts to register a handler. -+++ -|[[REGISTERED]]`REGISTERED`|+++ -This event will occur when a client successfully registered. The raw message used for registration, notified with event -+++ -|[[UNREGISTER]]`UNREGISTER`|+++ -This event will occur when a client attempts to unregister a handler. -+++ -|=== - diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..30d42f4 --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,6 @@ +module io.vertx.eventbusbridge { + requires static io.vertx.codegen.api; + requires static io.vertx.codegen.json; + requires io.vertx.core; + exports io.vertx.ext.bridge; +} diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF index 456d7e9..e69de29 100644 --- a/src/main/resources/META-INF/MANIFEST.MF +++ b/src/main/resources/META-INF/MANIFEST.MF @@ -1,2 +0,0 @@ -Automatic-Module-Name: io.vertx.eventbusbridge.common - diff --git a/src/test/java/io/vertx/ext/bridge/BridgeOptionsTest.java b/src/test/java/io/vertx/ext/bridge/tests/BridgeOptionsTest.java similarity index 96% rename from src/test/java/io/vertx/ext/bridge/BridgeOptionsTest.java rename to src/test/java/io/vertx/ext/bridge/tests/BridgeOptionsTest.java index b58ea8d..38e554c 100644 --- a/src/test/java/io/vertx/ext/bridge/BridgeOptionsTest.java +++ b/src/test/java/io/vertx/ext/bridge/tests/BridgeOptionsTest.java @@ -1,6 +1,8 @@ -package io.vertx.ext.bridge; +package io.vertx.ext.bridge.tests; import io.vertx.core.json.JsonObject; +import io.vertx.ext.bridge.BridgeOptions; +import io.vertx.ext.bridge.PermittedOptions; import org.junit.Test; import java.util.ArrayList; @@ -80,4 +82,4 @@ public void testSerialization() { assertThat(options2.getOutboundPermitteds()).hasSize(1); } -} \ No newline at end of file +} diff --git a/src/test/java/io/vertx/ext/bridge/PermittedOptionsTest.java b/src/test/java/io/vertx/ext/bridge/tests/PermittedOptionsTest.java similarity index 96% rename from src/test/java/io/vertx/ext/bridge/PermittedOptionsTest.java rename to src/test/java/io/vertx/ext/bridge/tests/PermittedOptionsTest.java index 20cf7a8..1f2be8a 100644 --- a/src/test/java/io/vertx/ext/bridge/PermittedOptionsTest.java +++ b/src/test/java/io/vertx/ext/bridge/tests/PermittedOptionsTest.java @@ -1,6 +1,7 @@ -package io.vertx.ext.bridge; +package io.vertx.ext.bridge.tests; import io.vertx.core.json.JsonObject; +import io.vertx.ext.bridge.PermittedOptions; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -60,4 +61,4 @@ public void testSerializationPermittedOption() { assertThat(options2.getMatch()).isEqualTo(new JsonObject().put("foo", "")); } -} \ No newline at end of file +} diff --git a/src/test/java/module-info.java b/src/test/java/module-info.java new file mode 100644 index 0000000..7796070 --- /dev/null +++ b/src/test/java/module-info.java @@ -0,0 +1,5 @@ +open module io.vertx.eventbusbridge.tests { + requires io.vertx.core; + requires io.vertx.eventbusbridge; + requires junit; +} diff --git a/src/test/kotlin/io/vertx/kotlin/ext/bridge/inheritance/MyBridgeOptions.kt b/src/test/kotlin/io/vertx/kotlin/ext/bridge/inheritance/MyBridgeOptions.kt deleted file mode 100644 index 2e6fc7b..0000000 --- a/src/test/kotlin/io/vertx/kotlin/ext/bridge/inheritance/MyBridgeOptions.kt +++ /dev/null @@ -1,32 +0,0 @@ -package io.vertx.kotlin.ext.bridge.inheritance - -import io.vertx.ext.bridge.inheritance.MyBridgeOptions -import io.vertx.ext.bridge.PermittedOptions - -/** - * A function providing a DSL for building [io.vertx.ext.bridge.inheritance.MyBridgeOptions] objects. - * - * - * @param flag - * @param inboundPermitteds - * @param outboundPermitteds - * - *

- * NOTE: This function has been automatically generated from the [io.vertx.ext.bridge.inheritance.MyBridgeOptions original] using Vert.x codegen. - */ -fun MyBridgeOptions( - flag: Boolean? = null, - inboundPermitteds: Iterable? = null, - outboundPermitteds: Iterable? = null): MyBridgeOptions = io.vertx.ext.bridge.inheritance.MyBridgeOptions().apply { - - if (flag != null) { - this.setFlag(flag) - } - if (inboundPermitteds != null) { - this.setInboundPermitteds(inboundPermitteds.toList()) - } - if (outboundPermitteds != null) { - this.setOutboundPermitteds(outboundPermitteds.toList()) - } -} -