From 67e2c9ac9fe7f48a4309503abdf6ec7164041a52 Mon Sep 17 00:00:00 2001 From: Daniel Fiala Date: Thu, 25 Apr 2024 08:46:23 +0200 Subject: [PATCH] chore(transcoding): fixed java docs --- .../io/quarkus/grpc/transcoding/GrpcTranscodingBridge.java | 1 - .../grpc/transcoding/GrpcTranscodingMessageDecoder.java | 2 +- .../grpc/transcoding/GrpcTranscodingMessageEncoder.java | 2 +- .../quarkus/grpc/transcoding/GrpcTranscodingMetadata.java | 6 ++++++ .../io/quarkus/grpc/transcoding/GrpcTranscodingMethod.java | 3 +++ .../quarkus/grpc/transcoding/GrpcTranscodingResponse.java | 4 ++-- .../grpc/examples/hello/HelloWorldNewEndpointTest.java | 2 +- 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingBridge.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingBridge.java index 840312ba12448e..0a17cd4950c932 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingBridge.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingBridge.java @@ -24,7 +24,6 @@ /** * A bridge that binds and unbinds transcoding methods to a {@link GrpcServer}. - *

* * @see io.vertx.grpc.server.impl.GrpcServiceBridgeImpl for the default implementation. */ diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMessageDecoder.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMessageDecoder.java index 81688d9e0e577a..c61dffb50ff594 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMessageDecoder.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMessageDecoder.java @@ -10,7 +10,7 @@ * A message decoder that uses a {@link MethodDescriptor.Marshaller} to decode the message payload. * * @param The type of the message payload. - * @see io.vertx.grpc.common.impl.GrpcMessageDecoderImpl + * @see io.vertx.grpc.common.impl.GrpcMessageDecoderImpl for the original implementation */ public class GrpcTranscodingMessageDecoder implements GrpcMessageDecoder { diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMessageEncoder.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMessageEncoder.java index bda963d84ae59a..4a2e39a03aa418 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMessageEncoder.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMessageEncoder.java @@ -12,7 +12,7 @@ * A message encoder that uses a {@link MethodDescriptor.Marshaller} to encode the message payload. * * @param The type of the message payload. - * @see io.vertx.grpc.common.impl.GrpcMessageEncoderImpl + * @see io.vertx.grpc.common.impl.GrpcMessageEncoderImpl for the original implementation */ public class GrpcTranscodingMessageEncoder implements GrpcMessageEncoder { diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMetadata.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMetadata.java index 031cd84a213a99..212f1b4a7fa872 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMetadata.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMetadata.java @@ -5,6 +5,12 @@ import io.grpc.MethodDescriptor; import io.quarkus.grpc.GrpcTranscodingMarshaller; +/** + * A metadata class that holds the transcoding information for a gRPC method. + * + * @param The type of the request message. + * @param The type of the response message. + */ public class GrpcTranscodingMetadata { private final String httpMethodName; diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMethod.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMethod.java index 5ad1e3765d617b..3fbaf90a0d11ea 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMethod.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingMethod.java @@ -1,5 +1,8 @@ package io.quarkus.grpc.transcoding; +/** + * A metadata class that holds the transcoding information for a gRPC method. + */ public final class GrpcTranscodingMethod { private final String grpcMethodName; diff --git a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingResponse.java b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingResponse.java index 63044b84ec458f..abe58cee39cbcc 100644 --- a/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingResponse.java +++ b/extensions/grpc/runtime/src/main/java/io/quarkus/grpc/transcoding/GrpcTranscodingResponse.java @@ -31,7 +31,6 @@ public class GrpcTranscodingResponse implements GrpcServerResponse request; private final HttpServerResponse httpResponse; private final GrpcMessageEncoder encoder; - private String encoding; private GrpcStatus status = GrpcStatus.OK; private String statusMessage; private boolean headersSent; @@ -58,8 +57,9 @@ public GrpcServerResponse statusMessage(String msg) { return this; } + // We don't need to implement this method public GrpcServerResponse encoding(String encoding) { - this.encoding = encoding; + // ???? return this; } diff --git a/integration-tests/grpc-transcoding/src/test/java/io/quarkus/grpc/examples/hello/HelloWorldNewEndpointTest.java b/integration-tests/grpc-transcoding/src/test/java/io/quarkus/grpc/examples/hello/HelloWorldNewEndpointTest.java index 54373b22addc10..7a41d9f437c0a9 100644 --- a/integration-tests/grpc-transcoding/src/test/java/io/quarkus/grpc/examples/hello/HelloWorldNewEndpointTest.java +++ b/integration-tests/grpc-transcoding/src/test/java/io/quarkus/grpc/examples/hello/HelloWorldNewEndpointTest.java @@ -19,7 +19,7 @@ class HelloWorldNewEndpointTest extends HelloWorldNewEndpointTestBase { @Test public void testSimplePath() { given() - .body(getJsonRequest("simple-test")) // Customize for your service + .body(getJsonRequest("simple-test")) .contentType(ContentType.JSON) .when().post("/v1/simple") .then()