From 56f0df212973960228f7e2c334608e2c37310eac Mon Sep 17 00:00:00 2001 From: Santiago Pericas-Geertsen Date: Thu, 18 Jul 2024 10:40:12 -0400 Subject: [PATCH] Moves helidon-microprofile-grpc-api to helidon-grpc-api in order to share annoations and types with future declarative SE API. Signed-off-by: Santiago Pericas-Geertsen --- all/pom.xml | 8 +++---- bom/pom.xml | 4 ++-- {microprofile/grpc => grpc}/api/pom.xml | 23 ++++++++----------- .../io/helidon}/grpc/api/Bidirectional.java | 7 +++--- .../io/helidon}/grpc/api/ClientStreaming.java | 4 ++-- .../main/java/io/helidon}/grpc/api/Grpc.java | 9 +++----- .../io/helidon}/grpc/api/GrpcInterceptor.java | 21 +---------------- .../grpc/api/GrpcInterceptorBinding.java | 10 +------- .../helidon}/grpc/api/GrpcInterceptors.java | 2 +- .../io/helidon}/grpc/api/GrpcMarshaller.java | 21 ++++++++++++----- .../java/io/helidon}/grpc/api/GrpcMethod.java | 2 +- .../io/helidon}/grpc/api/RequestType.java | 2 +- .../io/helidon}/grpc/api/ResponseType.java | 2 +- .../io/helidon}/grpc/api/ServerStreaming.java | 2 +- .../main/java/io/helidon}/grpc/api/Unary.java | 2 +- .../io/helidon}/grpc/api/package-info.java | 4 ++-- .../api/src/main/java/module-info.java | 9 +++----- .../helidon/grpc/core/MarshallerSupplier.java | 10 -------- grpc/pom.xml | 1 + microprofile/grpc/core/pom.xml | 8 +++---- .../core/AbstractMethodHandlerSupplier.java | 8 +++---- .../grpc/core/AbstractServiceBuilder.java | 6 ++--- .../grpc/core/AnnotatedMethod.java | 10 ++++---- .../grpc/core/GrpcCdiExtension.java | 2 +- .../microprofile/grpc/core/ModelHelper.java | 4 ++-- .../grpc/core/src/main/java/module-info.java | 2 +- .../AbstractMethodHandlerSupplierTest.java | 8 +++---- .../grpc/core/AnnotatedMethodListTest.java | 8 +++---- .../grpc/core/AnnotatedMethodTest.java | 4 ++-- ...idirectionalMethodHandlerSupplierTest.java | 12 +++++----- ...entStreamingMethodHandlerSupplierTest.java | 12 +++++----- .../grpc/core/ModelHelperTest.java | 9 ++++---- ...verStreamingMethodHandlerSupplierTest.java | 14 +++++------ .../core/UnaryMethodHandlerSupplierTest.java | 14 +++++------ microprofile/grpc/pom.xml | 1 - .../grpc/server/GrpcMpCdiExtension.java | 15 ++++++------ .../grpc/server/GrpcServiceBuilder.java | 12 ++++------ .../server/src/main/java/module-info.java | 2 +- .../grpc/server/GrpcServiceBuilderTest.java | 6 ++--- .../grpc/tests/EchoServiceTest.java | 10 ++++---- .../grpc/tests/StringServiceTest.java | 10 ++++---- ...=> io.helidon.grpc.api.MarshallerSupplier} | 0 42 files changed, 139 insertions(+), 181 deletions(-) rename {microprofile/grpc => grpc}/api/pom.xml (60%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/Bidirectional.java (88%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/ClientStreaming.java (94%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/Grpc.java (89%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/GrpcInterceptor.java (76%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/GrpcInterceptorBinding.java (62%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/GrpcInterceptors.java (97%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/GrpcMarshaller.java (73%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/GrpcMethod.java (97%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/RequestType.java (96%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/ResponseType.java (96%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/ServerStreaming.java (97%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/Unary.java (96%) rename {microprofile/grpc/api/src/main/java/io/helidon/microprofile => grpc/api/src/main/java/io/helidon}/grpc/api/package-info.java (89%) rename {microprofile/grpc => grpc}/api/src/main/java/module-info.java (77%) rename microprofile/grpc/tests/src/test/resources/META-INF/services/{io.helidon.grpc.core.MarshallerSupplier => io.helidon.grpc.api.MarshallerSupplier} (100%) diff --git a/all/pom.xml b/all/pom.xml index 96545976615..66917884a61 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -281,10 +281,6 @@ io.helidon.microprofile.service-common helidon-microprofile-service-common - - io.helidon.microprofile.grpc - helidon-microprofile-grpc-api - io.helidon.microprofile.grpc helidon-microprofile-grpc-core @@ -525,6 +521,10 @@ io.helidon.tracing helidon-tracing-jersey + + io.helidon.grpc + helidon-grpc-api + io.helidon.grpc helidon-grpc-core diff --git a/bom/pom.xml b/bom/pom.xml index 48b866d67b6..4ce3bc59d8a 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -101,8 +101,8 @@ ${helidon.version} - io.helidon.microprofile.grpc - helidon-microprofile-grpc-api + io.helidon.grpc + helidon-grpc-api ${helidon.version} diff --git a/microprofile/grpc/api/pom.xml b/grpc/api/pom.xml similarity index 60% rename from microprofile/grpc/api/pom.xml rename to grpc/api/pom.xml index efec60fbbc1..25e8f98f9fc 100644 --- a/microprofile/grpc/api/pom.xml +++ b/grpc/api/pom.xml @@ -15,28 +15,23 @@ limitations under the License. --> - - 4.0.0 - io.helidon.microprofile.grpc - helidon-microprofile-grpc-project + helidon-grpc-project + io.helidon.grpc 4.1.0-SNAPSHOT + 4.0.0 - helidon-microprofile-grpc-api - Helidon Microprofile gRPC Api + helidon-grpc-api + Helidon gRPC API - io.helidon.grpc - helidon-grpc-core - - - jakarta.enterprise - jakarta.enterprise.cdi-api - provided + io.grpc + grpc-api \ No newline at end of file diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/Bidirectional.java b/grpc/api/src/main/java/io/helidon/grpc/api/Bidirectional.java similarity index 88% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/Bidirectional.java rename to grpc/api/src/main/java/io/helidon/grpc/api/Bidirectional.java index e7f00c3f0a9..84435ebb2c5 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/Bidirectional.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/Bidirectional.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -26,8 +26,7 @@ import io.grpc.MethodDescriptor.MethodType; /** - * An annotation to mark a class as representing a - * bi-directional streaming gRPC method. + * An annotation to mark a class as representing a bi-directional streaming gRPC method. */ @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @@ -40,7 +39,7 @@ *

* If not set the name of the actual annotated method is used. * - * @return name of the method + * @return name of the method */ String value() default ""; } diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/ClientStreaming.java b/grpc/api/src/main/java/io/helidon/grpc/api/ClientStreaming.java similarity index 94% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/ClientStreaming.java rename to grpc/api/src/main/java/io/helidon/grpc/api/ClientStreaming.java index 63873a58e06..131bef03fb6 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/ClientStreaming.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/ClientStreaming.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -39,7 +39,7 @@ *

* If not set the name of the actual annotated method is used. * - * @return name of the method + * @return name of the method */ String value() default ""; } diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/Grpc.java b/grpc/api/src/main/java/io/helidon/grpc/api/Grpc.java similarity index 89% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/Grpc.java rename to grpc/api/src/main/java/io/helidon/grpc/api/Grpc.java index 0a34bbd4c62..298eb5363da 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/Grpc.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/Grpc.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -23,12 +23,9 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import jakarta.inject.Qualifier; - /** * An annotation used to mark a class as representing a gRPC service. */ -@Qualifier @Target({ElementType.TYPE, ElementType.FIELD, ElementType.CONSTRUCTOR}) @Retention(RetentionPolicy.RUNTIME) @Inherited @@ -37,14 +34,14 @@ /** * Obtain the service name. * - * @return the service name + * @return the service name */ String value() default ""; /** * Obtain the service version. * - * @return the service version + * @return the service version */ int version() default 0; } diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcInterceptor.java b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcInterceptor.java similarity index 76% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcInterceptor.java rename to grpc/api/src/main/java/io/helidon/grpc/api/GrpcInterceptor.java index aed14f4b791..d5d56a3366d 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcInterceptor.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcInterceptor.java @@ -14,16 +14,12 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; -import java.io.Serial; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import jakarta.enterprise.util.AnnotationLiteral; -import jakarta.inject.Qualifier; - import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -57,23 +53,8 @@ * It is required when a {@linkplain GrpcInterceptorBinding interceptor binding} * is used.

*/ -@Qualifier @Retention(RUNTIME) @Target(TYPE) @Documented public @interface GrpcInterceptor { - - /** - * An {@link AnnotationLiteral} for the {@link GrpcInterceptor} annotation. - */ - class Literal extends AnnotationLiteral implements GrpcInterceptor { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * The singleton instance of {@link GrpcInterceptor.Literal}. - */ - public static final Literal INSTANCE = new Literal(); - } } diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcInterceptorBinding.java b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcInterceptorBinding.java similarity index 62% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcInterceptorBinding.java rename to grpc/api/src/main/java/io/helidon/grpc/api/GrpcInterceptorBinding.java index 575ce6e3ca6..9089837d861 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcInterceptorBinding.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcInterceptorBinding.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.Retention; @@ -26,14 +26,6 @@ /** * Specifies that an annotation type is a gRPC interceptor binding type. A gRPC Interceptor binding is * used to specify the binding of a gRPC client or server interceptor to target gRPC service and methods. - *

- * The annotation type that is marked as a binding must be applied to a client of server gRPC interceptor - * implementation class (marked with the {@code jakarta.interceptor.Interceptor @Interceptor} annotation to associate that annotation with an interceptor. The annotation - * may then be applied instead of, or in addition to, the {@code jakarta.interceptor.Interceptors @Interceptors} annotation to specify - * what interceptors are attached to the class or method. - *

- * The associated annotation type must be associated only with {@link java.lang.annotation.ElementType#TYPE TYPE}s and/or - * {@link java.lang.annotation.ElementType#METHOD METHOD}s. */ @Target(ANNOTATION_TYPE) @Retention(RUNTIME) diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcInterceptors.java b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcInterceptors.java similarity index 97% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcInterceptors.java rename to grpc/api/src/main/java/io/helidon/grpc/api/GrpcInterceptors.java index 51d5e553618..6cf247f651f 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcInterceptors.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcInterceptors.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcMarshaller.java b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcMarshaller.java similarity index 73% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcMarshaller.java rename to grpc/api/src/main/java/io/helidon/grpc/api/GrpcMarshaller.java index e45f0ff6f7d..c71b4156265 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcMarshaller.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcMarshaller.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -22,8 +22,6 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import io.helidon.grpc.core.MarshallerSupplier; - /** * An annotation used to annotate a type or method to specify the * named marshaller supplier to use for rpc method calls. @@ -33,9 +31,20 @@ @Documented @Inherited public @interface GrpcMarshaller { + + /** + * The name of the Protocol Buffer marshaller supplier. + */ + String PROTO = "proto"; + + /** + * The name to use to specify the default marshaller supplier. + */ + String DEFAULT = "default"; + /** - * Obtain the type of the {@link MarshallerSupplier} to use. - * @return the type of the {@link MarshallerSupplier} to use + * Obtain the type of the {@code MarshallerSupplier} to use. + * @return the type of the {@code MarshallerSupplier} to use */ - String value() default MarshallerSupplier.DEFAULT; + String value() default DEFAULT; } diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcMethod.java b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcMethod.java similarity index 97% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcMethod.java rename to grpc/api/src/main/java/io/helidon/grpc/api/GrpcMethod.java index 32266e80307..ad37ef481fb 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/GrpcMethod.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/GrpcMethod.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/RequestType.java b/grpc/api/src/main/java/io/helidon/grpc/api/RequestType.java similarity index 96% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/RequestType.java rename to grpc/api/src/main/java/io/helidon/grpc/api/RequestType.java index d304790fec3..75339570a05 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/RequestType.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/RequestType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/ResponseType.java b/grpc/api/src/main/java/io/helidon/grpc/api/ResponseType.java similarity index 96% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/ResponseType.java rename to grpc/api/src/main/java/io/helidon/grpc/api/ResponseType.java index 1e7c9d987df..7aba0382a57 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/ResponseType.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/ResponseType.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/ServerStreaming.java b/grpc/api/src/main/java/io/helidon/grpc/api/ServerStreaming.java similarity index 97% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/ServerStreaming.java rename to grpc/api/src/main/java/io/helidon/grpc/api/ServerStreaming.java index f74857d8526..b76c34eb95b 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/ServerStreaming.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/ServerStreaming.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/Unary.java b/grpc/api/src/main/java/io/helidon/grpc/api/Unary.java similarity index 96% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/Unary.java rename to grpc/api/src/main/java/io/helidon/grpc/api/Unary.java index d274411983f..02e34e4aff6 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/Unary.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/Unary.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/package-info.java b/grpc/api/src/main/java/io/helidon/grpc/api/package-info.java similarity index 89% rename from microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/package-info.java rename to grpc/api/src/main/java/io/helidon/grpc/api/package-info.java index 2bdc5cc1594..bbb3b7bbaae 100644 --- a/microprofile/grpc/api/src/main/java/io/helidon/microprofile/grpc/api/package-info.java +++ b/grpc/api/src/main/java/io/helidon/grpc/api/package-info.java @@ -15,6 +15,6 @@ */ /** - * API gRPC microprofile classes. + * Helidon gRPC API module. */ -package io.helidon.microprofile.grpc.api; +package io.helidon.grpc.api; diff --git a/microprofile/grpc/api/src/main/java/module-info.java b/grpc/api/src/main/java/module-info.java similarity index 77% rename from microprofile/grpc/api/src/main/java/module-info.java rename to grpc/api/src/main/java/module-info.java index c39acf43e7e..afae6300497 100644 --- a/microprofile/grpc/api/src/main/java/module-info.java +++ b/grpc/api/src/main/java/module-info.java @@ -13,12 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +module io.helidon.grpc.api { -module io.helidon.microprofile.grpc.api { + requires transitive io.grpc; - requires io.helidon.grpc.core; - requires jakarta.inject; - requires jakarta.cdi; - - exports io.helidon.microprofile.grpc.api; + exports io.helidon.grpc.api; } \ No newline at end of file diff --git a/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java b/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java index ab2e8c5453c..7a2d3ba2bcb 100644 --- a/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java +++ b/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java @@ -25,16 +25,6 @@ @FunctionalInterface public interface MarshallerSupplier { - /** - * The name of the Protocol Buffer marshaller supplier. - */ - String PROTO = "proto"; - - /** - * The name to use to specify the default marshaller supplier. - */ - String DEFAULT = "default"; - /** * Obtain a {@link MethodDescriptor.Marshaller} for a type. * diff --git a/grpc/pom.xml b/grpc/pom.xml index be4cddcc811..2729c49e310 100644 --- a/grpc/pom.xml +++ b/grpc/pom.xml @@ -33,6 +33,7 @@ gRPC support for Helidon + api core diff --git a/microprofile/grpc/core/pom.xml b/microprofile/grpc/core/pom.xml index 6922c0d1fc6..1627be21150 100644 --- a/microprofile/grpc/core/pom.xml +++ b/microprofile/grpc/core/pom.xml @@ -29,6 +29,10 @@ Helidon Microprofile gRPC Core + + io.helidon.grpc + helidon-grpc-api + io.helidon.grpc helidon-grpc-core @@ -37,10 +41,6 @@ io.helidon.common helidon-common - - io.helidon.microprofile.grpc - helidon-microprofile-grpc-api - io.helidon.microprofile.config helidon-microprofile-config diff --git a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AbstractMethodHandlerSupplier.java b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AbstractMethodHandlerSupplier.java index de862e5c54b..989d018fcdb 100644 --- a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AbstractMethodHandlerSupplier.java +++ b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AbstractMethodHandlerSupplier.java @@ -22,12 +22,12 @@ import java.util.Objects; import java.util.function.Supplier; +import io.helidon.grpc.api.GrpcMethod; +import io.helidon.grpc.api.RequestType; +import io.helidon.grpc.api.ResponseType; import io.helidon.grpc.core.GrpcHelper; import io.helidon.grpc.core.MethodHandler; import io.helidon.grpc.core.SafeStreamObserver; -import io.helidon.microprofile.grpc.api.GrpcMethod; -import io.helidon.microprofile.grpc.api.RequestType; -import io.helidon.microprofile.grpc.api.ResponseType; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; @@ -155,7 +155,7 @@ public StreamObserver invoke(StreamObserver observer) { * @param method the {@link Method} to invoke * @param instance the service instance to invoke the method on * @param observer the method response observer - * @return the {@link StreamObserver} to receive requests from the client + * @return the {@link StreamObserver} to receive requests from the client * @throws InvocationTargetException if an error occurs invoking the method * @throws IllegalAccessException if the method cannot be accessed */ diff --git a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AbstractServiceBuilder.java b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AbstractServiceBuilder.java index 704b1e72ddb..db82dab1690 100644 --- a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AbstractServiceBuilder.java +++ b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AbstractServiceBuilder.java @@ -27,10 +27,10 @@ import java.util.function.Supplier; import io.helidon.common.HelidonServiceLoader; +import io.helidon.grpc.api.Grpc; +import io.helidon.grpc.api.GrpcMarshaller; +import io.helidon.grpc.api.GrpcMethod; import io.helidon.grpc.core.MarshallerSupplier; -import io.helidon.microprofile.grpc.api.Grpc; -import io.helidon.microprofile.grpc.api.GrpcMarshaller; -import io.helidon.microprofile.grpc.api.GrpcMethod; import jakarta.inject.Singleton; diff --git a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AnnotatedMethod.java b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AnnotatedMethod.java index 4f7e4786c4c..32a253b5f3c 100644 --- a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AnnotatedMethod.java +++ b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/AnnotatedMethod.java @@ -28,11 +28,11 @@ import java.util.Set; import java.util.stream.Stream; -import io.helidon.microprofile.grpc.api.Bidirectional; -import io.helidon.microprofile.grpc.api.ClientStreaming; -import io.helidon.microprofile.grpc.api.GrpcMethod; -import io.helidon.microprofile.grpc.api.ServerStreaming; -import io.helidon.microprofile.grpc.api.Unary; +import io.helidon.grpc.api.Bidirectional; +import io.helidon.grpc.api.ClientStreaming; +import io.helidon.grpc.api.GrpcMethod; +import io.helidon.grpc.api.ServerStreaming; +import io.helidon.grpc.api.Unary; /** * A model of an annotated gRPC method. diff --git a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/GrpcCdiExtension.java b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/GrpcCdiExtension.java index ffb3b845823..756253fd525 100644 --- a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/GrpcCdiExtension.java +++ b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/GrpcCdiExtension.java @@ -16,7 +16,7 @@ package io.helidon.microprofile.grpc.core; -import io.helidon.microprofile.grpc.api.Grpc; +import io.helidon.grpc.api.Grpc; import jakarta.enterprise.event.Observes; import jakarta.enterprise.inject.spi.AnnotatedType; diff --git a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/ModelHelper.java b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/ModelHelper.java index bb800c2156c..939d5a481cf 100644 --- a/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/ModelHelper.java +++ b/microprofile/grpc/core/src/main/java/io/helidon/microprofile/grpc/core/ModelHelper.java @@ -29,8 +29,8 @@ import java.util.ServiceLoader; import java.util.stream.StreamSupport; +import io.helidon.grpc.api.GrpcMarshaller; import io.helidon.grpc.core.MarshallerSupplier; -import io.helidon.microprofile.grpc.api.GrpcMarshaller; import jakarta.enterprise.inject.Instance; import jakarta.enterprise.inject.spi.CDI; @@ -221,7 +221,7 @@ public static Class getArrayForComponentType(Class c) { * @return the {@link MarshallerSupplier} specified by the annotation */ public static MarshallerSupplier getMarshallerSupplier(GrpcMarshaller annotation) { - String name = annotation == null ? MarshallerSupplier.DEFAULT : annotation.value(); + String name = annotation == null ? GrpcMarshaller.DEFAULT : annotation.value(); Instance instance = null; try { diff --git a/microprofile/grpc/core/src/main/java/module-info.java b/microprofile/grpc/core/src/main/java/module-info.java index 4b3684122a6..1854adca9aa 100644 --- a/microprofile/grpc/core/src/main/java/module-info.java +++ b/microprofile/grpc/core/src/main/java/module-info.java @@ -20,8 +20,8 @@ module io.helidon.microprofile.grpc.core { requires io.helidon.common; + requires io.helidon.grpc.api; requires io.helidon.microprofile.config; - requires io.helidon.microprofile.grpc.api; requires transitive io.helidon.grpc.core; requires transitive jakarta.cdi; diff --git a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AbstractMethodHandlerSupplierTest.java b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AbstractMethodHandlerSupplierTest.java index d4fbe3fbbdf..c67e8de2053 100644 --- a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AbstractMethodHandlerSupplierTest.java +++ b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AbstractMethodHandlerSupplierTest.java @@ -20,10 +20,10 @@ import java.lang.reflect.Method; import java.util.function.Supplier; -import io.helidon.microprofile.grpc.api.Bidirectional; -import io.helidon.microprofile.grpc.api.ClientStreaming; -import io.helidon.microprofile.grpc.api.ServerStreaming; -import io.helidon.microprofile.grpc.api.Unary; +import io.helidon.grpc.api.Bidirectional; +import io.helidon.grpc.api.ClientStreaming; +import io.helidon.grpc.api.ServerStreaming; +import io.helidon.grpc.api.Unary; import io.grpc.MethodDescriptor; import io.grpc.Status; diff --git a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AnnotatedMethodListTest.java b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AnnotatedMethodListTest.java index a0deebd217d..22b7c0ef03c 100644 --- a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AnnotatedMethodListTest.java +++ b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AnnotatedMethodListTest.java @@ -21,10 +21,10 @@ import java.util.List; import java.util.stream.Collectors; -import io.helidon.microprofile.grpc.api.ClientStreaming; -import io.helidon.microprofile.grpc.api.GrpcMethod; -import io.helidon.microprofile.grpc.api.RequestType; -import io.helidon.microprofile.grpc.api.Unary; +import io.helidon.grpc.api.ClientStreaming; +import io.helidon.grpc.api.GrpcMethod; +import io.helidon.grpc.api.RequestType; +import io.helidon.grpc.api.Unary; import org.junit.jupiter.api.Test; diff --git a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AnnotatedMethodTest.java b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AnnotatedMethodTest.java index 171377aa86d..fcdb8d7314c 100644 --- a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AnnotatedMethodTest.java +++ b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/AnnotatedMethodTest.java @@ -19,8 +19,8 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Method; -import io.helidon.microprofile.grpc.api.Grpc; -import io.helidon.microprofile.grpc.api.GrpcMethod; +import io.helidon.grpc.api.Grpc; +import io.helidon.grpc.api.GrpcMethod; import io.grpc.MethodDescriptor; import jakarta.inject.Inject; diff --git a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/BidirectionalMethodHandlerSupplierTest.java b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/BidirectionalMethodHandlerSupplierTest.java index e24ba9a0202..07e207bdddf 100644 --- a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/BidirectionalMethodHandlerSupplierTest.java +++ b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/BidirectionalMethodHandlerSupplierTest.java @@ -17,12 +17,12 @@ package io.helidon.microprofile.grpc.core; import io.helidon.grpc.core.MethodHandler; -import io.helidon.microprofile.grpc.api.Bidirectional; -import io.helidon.microprofile.grpc.api.ClientStreaming; -import io.helidon.microprofile.grpc.api.RequestType; -import io.helidon.microprofile.grpc.api.ResponseType; -import io.helidon.microprofile.grpc.api.ServerStreaming; -import io.helidon.microprofile.grpc.api.Unary; +import io.helidon.grpc.api.Bidirectional; +import io.helidon.grpc.api.ClientStreaming; +import io.helidon.grpc.api.RequestType; +import io.helidon.grpc.api.ResponseType; +import io.helidon.grpc.api.ServerStreaming; +import io.helidon.grpc.api.Unary; import io.grpc.MethodDescriptor; import io.grpc.stub.StreamObserver; diff --git a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ClientStreamingMethodHandlerSupplierTest.java b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ClientStreamingMethodHandlerSupplierTest.java index d94e46a02ad..5a18afa3cf5 100644 --- a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ClientStreamingMethodHandlerSupplierTest.java +++ b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ClientStreamingMethodHandlerSupplierTest.java @@ -23,12 +23,12 @@ import java.util.stream.Stream; import io.helidon.grpc.core.MethodHandler; -import io.helidon.microprofile.grpc.api.Bidirectional; -import io.helidon.microprofile.grpc.api.ClientStreaming; -import io.helidon.microprofile.grpc.api.RequestType; -import io.helidon.microprofile.grpc.api.ResponseType; -import io.helidon.microprofile.grpc.api.ServerStreaming; -import io.helidon.microprofile.grpc.api.Unary; +import io.helidon.grpc.api.Bidirectional; +import io.helidon.grpc.api.ClientStreaming; +import io.helidon.grpc.api.RequestType; +import io.helidon.grpc.api.ResponseType; +import io.helidon.grpc.api.ServerStreaming; +import io.helidon.grpc.api.Unary; import io.grpc.MethodDescriptor; import io.grpc.stub.StreamObserver; diff --git a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ModelHelperTest.java b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ModelHelperTest.java index e70086d37c8..e2f3ba04099 100644 --- a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ModelHelperTest.java +++ b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ModelHelperTest.java @@ -18,9 +18,8 @@ import java.util.AbstractMap; -import io.helidon.grpc.core.MarshallerSupplier; -import io.helidon.microprofile.grpc.api.Grpc; -import io.helidon.microprofile.grpc.api.GrpcMarshaller; +import io.helidon.grpc.api.Grpc; +import io.helidon.grpc.api.GrpcMarshaller; import org.junit.jupiter.api.Test; @@ -65,7 +64,7 @@ private GrpcMarshaller getAnnotation(String method) throws Exception { return ModelHelperTest.class.getMethod(method).getAnnotation(GrpcMarshaller.class); } - @GrpcMarshaller(MarshallerSupplier.PROTO) + @GrpcMarshaller(GrpcMarshaller.PROTO) public void protoMarshaller() { } @@ -73,7 +72,7 @@ public void protoMarshaller() { public void implicitDefaultMarshaller() { } - @GrpcMarshaller(MarshallerSupplier.DEFAULT) + @GrpcMarshaller public void explicitDefaultMarshaller() { } diff --git a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ServerStreamingMethodHandlerSupplierTest.java b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ServerStreamingMethodHandlerSupplierTest.java index c563dc1e945..2af51d849f0 100644 --- a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ServerStreamingMethodHandlerSupplierTest.java +++ b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/ServerStreamingMethodHandlerSupplierTest.java @@ -21,13 +21,13 @@ import java.util.stream.Stream; import io.helidon.grpc.core.MethodHandler; -import io.helidon.microprofile.grpc.api.Bidirectional; -import io.helidon.microprofile.grpc.api.ClientStreaming; -import io.helidon.microprofile.grpc.api.Grpc; -import io.helidon.microprofile.grpc.api.RequestType; -import io.helidon.microprofile.grpc.api.ResponseType; -import io.helidon.microprofile.grpc.api.ServerStreaming; -import io.helidon.microprofile.grpc.api.Unary; +import io.helidon.grpc.api.Bidirectional; +import io.helidon.grpc.api.ClientStreaming; +import io.helidon.grpc.api.Grpc; +import io.helidon.grpc.api.RequestType; +import io.helidon.grpc.api.ResponseType; +import io.helidon.grpc.api.ServerStreaming; +import io.helidon.grpc.api.Unary; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; diff --git a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/UnaryMethodHandlerSupplierTest.java b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/UnaryMethodHandlerSupplierTest.java index 46b0e29846c..cf78f3ca267 100644 --- a/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/UnaryMethodHandlerSupplierTest.java +++ b/microprofile/grpc/core/src/test/java/io/helidon/microprofile/grpc/core/UnaryMethodHandlerSupplierTest.java @@ -20,13 +20,13 @@ import java.util.concurrent.CompletionStage; import io.helidon.grpc.core.MethodHandler; -import io.helidon.microprofile.grpc.api.Bidirectional; -import io.helidon.microprofile.grpc.api.ClientStreaming; -import io.helidon.microprofile.grpc.api.Grpc; -import io.helidon.microprofile.grpc.api.RequestType; -import io.helidon.microprofile.grpc.api.ResponseType; -import io.helidon.microprofile.grpc.api.ServerStreaming; -import io.helidon.microprofile.grpc.api.Unary; +import io.helidon.grpc.api.Bidirectional; +import io.helidon.grpc.api.ClientStreaming; +import io.helidon.grpc.api.Grpc; +import io.helidon.grpc.api.RequestType; +import io.helidon.grpc.api.ResponseType; +import io.helidon.grpc.api.ServerStreaming; +import io.helidon.grpc.api.Unary; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; diff --git a/microprofile/grpc/pom.xml b/microprofile/grpc/pom.xml index 71f807849d6..286d044c437 100644 --- a/microprofile/grpc/pom.xml +++ b/microprofile/grpc/pom.xml @@ -32,7 +32,6 @@ pom - api core server tracing diff --git a/microprofile/grpc/server/src/main/java/io/helidon/microprofile/grpc/server/GrpcMpCdiExtension.java b/microprofile/grpc/server/src/main/java/io/helidon/microprofile/grpc/server/GrpcMpCdiExtension.java index b4c557f9ede..c3b4c56e2c3 100644 --- a/microprofile/grpc/server/src/main/java/io/helidon/microprofile/grpc/server/GrpcMpCdiExtension.java +++ b/microprofile/grpc/server/src/main/java/io/helidon/microprofile/grpc/server/GrpcMpCdiExtension.java @@ -22,7 +22,7 @@ import io.helidon.common.HelidonServiceLoader; import io.helidon.config.Config; import io.helidon.config.mp.MpConfig; -import io.helidon.microprofile.grpc.api.Grpc; +import io.helidon.grpc.api.Grpc; import io.helidon.microprofile.grpc.server.spi.GrpcMpContext; import io.helidon.microprofile.grpc.server.spi.GrpcMpExtension; import io.helidon.microprofile.server.ServerCdiExtension; @@ -74,7 +74,7 @@ private GrpcRouting.Builder discoverGrpcRouting(BeanManager beanManager) { // we use the bean manager to do this as we need the actual bean class beanManager.getBeans(Object.class, Any.Literal.INSTANCE) .stream() - .filter(this::hasGrpcQualifier) + .filter(this::hasGrpcAnnotation) .forEach(bean -> { Class beanClass = bean.getBeanClass(); Annotation[] qualifiers = bean.getQualifiers().toArray(new Annotation[0]); @@ -103,10 +103,11 @@ private GrpcRouting.Builder discoverGrpcRouting(BeanManager beanManager) { return builder; } - private boolean hasGrpcQualifier(Bean bean) { - return bean.getQualifiers() + private boolean hasGrpcAnnotation(Bean bean) { + return bean.getTypes() .stream() - .anyMatch(q -> Grpc.class.isAssignableFrom(q.annotationType())); + .filter(t -> t instanceof Class) + .anyMatch(c -> ((Class) c).isAnnotationPresent(Grpc.class)); } /** @@ -124,7 +125,7 @@ private void register(Object service, GrpcRouting.Builder builder, Class cls, builder.service(serviceBuilder.build()); } else { LOGGER.log(Level.WARNING, - () -> "Discovered type is not a properly annotated gRPC service " + service.getClass()); + () -> "Discovered type is not a properly annotated gRPC service " + service.getClass()); } } @@ -157,7 +158,7 @@ public BeanManager beanManager() { }; HelidonServiceLoader.create(ServiceLoader.load(GrpcMpExtension.class)) - .forEach(ext -> ext.configure(context)); + .forEach(ext -> ext.configure(context)); beanManager.createInstance() .select(GrpcMpExtension.class) .stream() diff --git a/microprofile/grpc/server/src/main/java/io/helidon/microprofile/grpc/server/GrpcServiceBuilder.java b/microprofile/grpc/server/src/main/java/io/helidon/microprofile/grpc/server/GrpcServiceBuilder.java index e76edd753dc..3428eeb1f76 100644 --- a/microprofile/grpc/server/src/main/java/io/helidon/microprofile/grpc/server/GrpcServiceBuilder.java +++ b/microprofile/grpc/server/src/main/java/io/helidon/microprofile/grpc/server/GrpcServiceBuilder.java @@ -28,13 +28,12 @@ import io.helidon.common.Builder; import io.helidon.common.HelidonServiceLoader; +import io.helidon.grpc.api.GrpcInterceptorBinding; +import io.helidon.grpc.api.GrpcInterceptors; +import io.helidon.grpc.api.GrpcMarshaller; +import io.helidon.grpc.api.GrpcMethod; import io.helidon.grpc.core.ContextKeys; import io.helidon.grpc.core.MethodHandler; -import io.helidon.microprofile.grpc.api.GrpcInterceptor; -import io.helidon.microprofile.grpc.api.GrpcInterceptorBinding; -import io.helidon.microprofile.grpc.api.GrpcInterceptors; -import io.helidon.microprofile.grpc.api.GrpcMarshaller; -import io.helidon.microprofile.grpc.api.GrpcMethod; import io.helidon.microprofile.grpc.core.AbstractServiceBuilder; import io.helidon.microprofile.grpc.core.AnnotatedMethod; import io.helidon.microprofile.grpc.core.AnnotatedMethodList; @@ -273,8 +272,7 @@ private List lookupMethodInterceptors(BeanManager beanManager private ServerInterceptor lookupInterceptor(Annotation annotation, BeanManager beanManager) { jakarta.enterprise.inject.Instance instance; - instance = beanManager.createInstance() - .select(ServerInterceptor.class, GrpcInterceptor.Literal.INSTANCE); + instance = beanManager.createInstance().select(ServerInterceptor.class); List interceptors = instance.stream() .filter(interceptor -> hasAnnotation(interceptor, annotation)) diff --git a/microprofile/grpc/server/src/main/java/module-info.java b/microprofile/grpc/server/src/main/java/module-info.java index d52cc2e279e..71e2659d08f 100644 --- a/microprofile/grpc/server/src/main/java/module-info.java +++ b/microprofile/grpc/server/src/main/java/module-info.java @@ -33,7 +33,7 @@ requires io.helidon.common.features.api; requires io.helidon.config; requires io.helidon.config.mp; - requires io.helidon.microprofile.grpc.api; + requires io.helidon.grpc.api; requires io.helidon.microprofile.grpc.core; requires io.helidon.microprofile.server; requires io.helidon.webserver.grpc; diff --git a/microprofile/grpc/server/src/test/java/io/helidon/microprofile/grpc/server/GrpcServiceBuilderTest.java b/microprofile/grpc/server/src/test/java/io/helidon/microprofile/grpc/server/GrpcServiceBuilderTest.java index 4018abdf092..08460ebceae 100644 --- a/microprofile/grpc/server/src/test/java/io/helidon/microprofile/grpc/server/GrpcServiceBuilderTest.java +++ b/microprofile/grpc/server/src/test/java/io/helidon/microprofile/grpc/server/GrpcServiceBuilderTest.java @@ -20,9 +20,9 @@ import java.util.List; import java.util.Map; -import io.helidon.microprofile.grpc.api.Grpc; -import io.helidon.microprofile.grpc.api.GrpcMarshaller; -import io.helidon.microprofile.grpc.api.GrpcMethod; +import io.helidon.grpc.api.Grpc; +import io.helidon.grpc.api.GrpcMarshaller; +import io.helidon.grpc.api.GrpcMethod; import io.helidon.webserver.grpc.GrpcMethodDescriptor; import io.helidon.webserver.grpc.GrpcServiceDescriptor; diff --git a/microprofile/grpc/tests/src/test/java/io/helidon/microprofile/grpc/tests/EchoServiceTest.java b/microprofile/grpc/tests/src/test/java/io/helidon/microprofile/grpc/tests/EchoServiceTest.java index e6fcd342ceb..b99a4ebcb30 100644 --- a/microprofile/grpc/tests/src/test/java/io/helidon/microprofile/grpc/tests/EchoServiceTest.java +++ b/microprofile/grpc/tests/src/test/java/io/helidon/microprofile/grpc/tests/EchoServiceTest.java @@ -22,11 +22,11 @@ import java.util.Set; import io.helidon.grpc.core.ContextKeys; -import io.helidon.microprofile.grpc.api.Grpc; -import io.helidon.microprofile.grpc.api.GrpcInterceptor; -import io.helidon.microprofile.grpc.api.GrpcInterceptorBinding; -import io.helidon.microprofile.grpc.api.GrpcInterceptors; -import io.helidon.microprofile.grpc.api.Unary; +import io.helidon.grpc.api.Grpc; +import io.helidon.grpc.api.GrpcInterceptor; +import io.helidon.grpc.api.GrpcInterceptorBinding; +import io.helidon.grpc.api.GrpcInterceptors; +import io.helidon.grpc.api.Unary; import io.helidon.microprofile.grpc.tests.test.Echo; import io.helidon.microprofile.grpc.tests.test.EchoServiceGrpc; import io.helidon.tracing.Tracer; diff --git a/microprofile/grpc/tests/src/test/java/io/helidon/microprofile/grpc/tests/StringServiceTest.java b/microprofile/grpc/tests/src/test/java/io/helidon/microprofile/grpc/tests/StringServiceTest.java index 11eddbedadb..2ae200aa138 100644 --- a/microprofile/grpc/tests/src/test/java/io/helidon/microprofile/grpc/tests/StringServiceTest.java +++ b/microprofile/grpc/tests/src/test/java/io/helidon/microprofile/grpc/tests/StringServiceTest.java @@ -26,11 +26,11 @@ import io.helidon.grpc.core.CollectingObserver; import io.helidon.grpc.core.ResponseHelper; -import io.helidon.microprofile.grpc.api.Bidirectional; -import io.helidon.microprofile.grpc.api.ClientStreaming; -import io.helidon.microprofile.grpc.api.Grpc; -import io.helidon.microprofile.grpc.api.ServerStreaming; -import io.helidon.microprofile.grpc.api.Unary; +import io.helidon.grpc.api.Bidirectional; +import io.helidon.grpc.api.ClientStreaming; +import io.helidon.grpc.api.Grpc; +import io.helidon.grpc.api.ServerStreaming; +import io.helidon.grpc.api.Unary; import io.helidon.microprofile.grpc.tests.test.StringServiceGrpc; import io.helidon.microprofile.grpc.tests.test.Strings; diff --git a/microprofile/grpc/tests/src/test/resources/META-INF/services/io.helidon.grpc.core.MarshallerSupplier b/microprofile/grpc/tests/src/test/resources/META-INF/services/io.helidon.grpc.api.MarshallerSupplier similarity index 100% rename from microprofile/grpc/tests/src/test/resources/META-INF/services/io.helidon.grpc.core.MarshallerSupplier rename to microprofile/grpc/tests/src/test/resources/META-INF/services/io.helidon.grpc.api.MarshallerSupplier