From 2aaa45e2dafe8ce2f4935a36e147a4baf29745e8 Mon Sep 17 00:00:00 2001 From: Artem Vysochyn Date: Wed, 21 Jun 2023 08:59:51 +0300 Subject: [PATCH] Merged and removed bytebuf-codec module to services/trasport-rscoket (#839) --- pom.xml | 1 - services-bytebuf-codec/pom.xml | 24 ------------------- ...es.transport.api.ServiceMessageDataDecoder | 1 - .../rsocket/RSocketClientChannel.java | 1 - .../rsocket/RSocketClientTransport.java | 2 -- .../rsocket/RSocketServiceAcceptor.java | 2 -- .../rsocket}/ReferenceCountUtil.java | 2 +- .../ServiceMessageByteBufDataDecoder.java | 3 ++- .../rsocket}/ServiceMessageCodec.java | 5 +++- ...es.transport.api.ServiceMessageDataDecoder | 1 + .../services/StreamingServiceTest.java | 2 +- 11 files changed, 9 insertions(+), 35 deletions(-) delete mode 100644 services-bytebuf-codec/pom.xml delete mode 100644 services-bytebuf-codec/src/main/resources/META-INF/services/io.scalecube.services.transport.api.ServiceMessageDataDecoder rename {services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api => services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket}/ReferenceCountUtil.java (94%) rename {services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api => services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket}/ServiceMessageByteBufDataDecoder.java (71%) rename {services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api => services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket}/ServiceMessageCodec.java (97%) create mode 100644 services-transport-parent/services-transport-rsocket/src/main/resources/META-INF/services/io.scalecube.services.transport.api.ServiceMessageDataDecoder diff --git a/pom.xml b/pom.xml index 11563527b..d32e9dc81 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,6 @@ services-api services-transport-parent services-discovery - services-bytebuf-codec services-security services-examples diff --git a/services-bytebuf-codec/pom.xml b/services-bytebuf-codec/pom.xml deleted file mode 100644 index 5f9e9f0b3..000000000 --- a/services-bytebuf-codec/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - 4.0.0 - - - io.scalecube - scalecube-services-parent - 2.10.26-SNAPSHOT - - - scalecube-services-bytebuf-codec - - - - ${project.groupId} - scalecube-services-api - ${project.version} - - - io.projectreactor.netty - reactor-netty - - - - diff --git a/services-bytebuf-codec/src/main/resources/META-INF/services/io.scalecube.services.transport.api.ServiceMessageDataDecoder b/services-bytebuf-codec/src/main/resources/META-INF/services/io.scalecube.services.transport.api.ServiceMessageDataDecoder deleted file mode 100644 index 9cedc564b..000000000 --- a/services-bytebuf-codec/src/main/resources/META-INF/services/io.scalecube.services.transport.api.ServiceMessageDataDecoder +++ /dev/null @@ -1 +0,0 @@ -io.scalecube.services.transport.api.ServiceMessageByteBufDataDecoder \ No newline at end of file diff --git a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientChannel.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientChannel.java index 221225fed..c339c4ad4 100644 --- a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientChannel.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientChannel.java @@ -6,7 +6,6 @@ import io.scalecube.services.api.ServiceMessage; import io.scalecube.services.exceptions.ConnectionClosedException; import io.scalecube.services.transport.api.ClientChannel; -import io.scalecube.services.transport.api.ServiceMessageCodec; import java.lang.reflect.Type; import org.reactivestreams.Publisher; import org.slf4j.Logger; diff --git a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java index f5b41c34f..99e97f95d 100644 --- a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java @@ -18,8 +18,6 @@ import io.scalecube.services.transport.api.ClientTransport; import io.scalecube.services.transport.api.DataCodec; import io.scalecube.services.transport.api.HeadersCodec; -import io.scalecube.services.transport.api.ReferenceCountUtil; -import io.scalecube.services.transport.api.ServiceMessageCodec; import io.scalecube.utils.MaskUtil; import java.util.Collection; import java.util.Collections; diff --git a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServiceAcceptor.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServiceAcceptor.java index e573095bf..192d52624 100644 --- a/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServiceAcceptor.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketServiceAcceptor.java @@ -20,8 +20,6 @@ import io.scalecube.services.methods.ServiceMethodRegistry; import io.scalecube.services.transport.api.DataCodec; import io.scalecube.services.transport.api.HeadersCodec; -import io.scalecube.services.transport.api.ReferenceCountUtil; -import io.scalecube.services.transport.api.ServiceMessageCodec; import java.util.Collection; import org.reactivestreams.Publisher; import org.slf4j.Logger; diff --git a/services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ReferenceCountUtil.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ReferenceCountUtil.java similarity index 94% rename from services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ReferenceCountUtil.java rename to services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ReferenceCountUtil.java index 68447ee97..8d793ca8f 100644 --- a/services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ReferenceCountUtil.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ReferenceCountUtil.java @@ -1,4 +1,4 @@ -package io.scalecube.services.transport.api; +package io.scalecube.services.transport.rsocket; import io.netty.util.ReferenceCounted; import org.slf4j.Logger; diff --git a/services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ServiceMessageByteBufDataDecoder.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ServiceMessageByteBufDataDecoder.java similarity index 71% rename from services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ServiceMessageByteBufDataDecoder.java rename to services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ServiceMessageByteBufDataDecoder.java index 73256c477..298fe12e9 100644 --- a/services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ServiceMessageByteBufDataDecoder.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ServiceMessageByteBufDataDecoder.java @@ -1,6 +1,7 @@ -package io.scalecube.services.transport.api; +package io.scalecube.services.transport.rsocket; import io.scalecube.services.api.ServiceMessage; +import io.scalecube.services.transport.api.ServiceMessageDataDecoder; public class ServiceMessageByteBufDataDecoder implements ServiceMessageDataDecoder { diff --git a/services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ServiceMessageCodec.java b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ServiceMessageCodec.java similarity index 97% rename from services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ServiceMessageCodec.java rename to services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ServiceMessageCodec.java index 2b86ef113..d10075d0f 100644 --- a/services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ServiceMessageCodec.java +++ b/services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ServiceMessageCodec.java @@ -1,4 +1,4 @@ -package io.scalecube.services.transport.api; +package io.scalecube.services.transport.rsocket; import static java.util.function.Function.identity; import static java.util.stream.Collectors.collectingAndThen; @@ -12,6 +12,9 @@ import io.scalecube.services.api.ErrorData; import io.scalecube.services.api.ServiceMessage; import io.scalecube.services.exceptions.MessageCodecException; +import io.scalecube.services.transport.api.DataCodec; +import io.scalecube.services.transport.api.HeadersCodec; +import io.scalecube.services.transport.api.JdkCodec; import java.lang.reflect.Type; import java.util.Collection; import java.util.Collections; diff --git a/services-transport-parent/services-transport-rsocket/src/main/resources/META-INF/services/io.scalecube.services.transport.api.ServiceMessageDataDecoder b/services-transport-parent/services-transport-rsocket/src/main/resources/META-INF/services/io.scalecube.services.transport.api.ServiceMessageDataDecoder new file mode 100644 index 000000000..9b28d9427 --- /dev/null +++ b/services-transport-parent/services-transport-rsocket/src/main/resources/META-INF/services/io.scalecube.services.transport.api.ServiceMessageDataDecoder @@ -0,0 +1 @@ +io.scalecube.services.transport.rsocket.ServiceMessageByteBufDataDecoder diff --git a/services/src/test/java/io/scalecube/services/StreamingServiceTest.java b/services/src/test/java/io/scalecube/services/StreamingServiceTest.java index 890a6785f..6336a839a 100644 --- a/services/src/test/java/io/scalecube/services/StreamingServiceTest.java +++ b/services/src/test/java/io/scalecube/services/StreamingServiceTest.java @@ -10,7 +10,7 @@ import io.scalecube.services.discovery.ScalecubeServiceDiscovery; import io.scalecube.services.sut.QuoteService; import io.scalecube.services.sut.SimpleQuoteService; -import io.scalecube.services.transport.api.ServiceMessageCodec; +import io.scalecube.services.transport.rsocket.ServiceMessageCodec; import io.scalecube.services.transport.rsocket.RSocketServiceTransport; import io.scalecube.transport.netty.websocket.WebsocketTransportFactory; import java.time.Duration;