Skip to content

Commit

Permalink
chore(transcoding): fixed java docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zZHorizonZz committed Apr 25, 2024
1 parent db6beaa commit 67e2c9a
Showing 7 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@

/**
* A bridge that binds and unbinds transcoding methods to a {@link GrpcServer}.
* <p>
*
* @see io.vertx.grpc.server.impl.GrpcServiceBridgeImpl for the default implementation.
*/
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
* A message decoder that uses a {@link MethodDescriptor.Marshaller} to decode the message payload.
*
* @param <T> 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<T> implements GrpcMessageDecoder<T> {

Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
* A message encoder that uses a {@link MethodDescriptor.Marshaller} to encode the message payload.
*
* @param <T> 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<T> implements GrpcMessageEncoder<T> {

Original file line number Diff line number Diff line change
@@ -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 <Req> The type of the request message.
* @param <Resp> The type of the response message.
*/
public class GrpcTranscodingMetadata<Req extends Message, Resp extends Message> {

private final String httpMethodName;
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -31,7 +31,6 @@ public class GrpcTranscodingResponse<Req, Resp> implements GrpcServerResponse<Re
private final GrpcTranscodingRequest<Req, Resp> request;
private final HttpServerResponse httpResponse;
private final GrpcMessageEncoder<Resp> encoder;
private String encoding;
private GrpcStatus status = GrpcStatus.OK;
private String statusMessage;
private boolean headersSent;
@@ -58,8 +57,9 @@ public GrpcServerResponse<Req, Resp> statusMessage(String msg) {
return this;
}

// We don't need to implement this method
public GrpcServerResponse<Req, Resp> encoding(String encoding) {
this.encoding = encoding;
// ????
return this;
}

Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 67e2c9a

Please sign in to comment.