forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(transcoding): removed unnecessary code
- Loading branch information
1 parent
3e9ce41
commit 2af788d
Showing
6 changed files
with
61 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 28 additions & 6 deletions
34
...pc/runtime/src/main/java/io/quarkus/grpc/runtime/transcoding/GrpcTranscodingMetadata.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,45 @@ | ||
package io.quarkus.grpc.runtime.transcoding; | ||
|
||
import com.google.api.HttpRule; | ||
import com.google.protobuf.Message; | ||
|
||
import io.grpc.MethodDescriptor; | ||
import io.quarkus.grpc.GrpcTranscodingMarshaller; | ||
|
||
public class GrpcTranscodingMetadata<Req, Resp> { | ||
public class GrpcTranscodingMetadata<Req extends Message, Resp extends Message> { | ||
|
||
private final String httpMethodName; | ||
private final String grpcMethodName; | ||
private final GrpcTranscodingMarshaller<Req> requestMarshaller; | ||
private final GrpcTranscodingMarshaller<Resp> responseMarshaller; | ||
private final MethodDescriptor<Req, Resp> methodDescriptor; | ||
|
||
public GrpcTranscodingMetadata(MethodDescriptor<Req, Resp> methodDescriptor, HttpRule httpRule) { | ||
public GrpcTranscodingMetadata(String httpMethodName, String grpcMethodName, | ||
GrpcTranscodingMarshaller<Req> requestMarshaller, | ||
GrpcTranscodingMarshaller<Resp> responseMarshaller, MethodDescriptor<Req, Resp> methodDescriptor) { | ||
this.httpMethodName = httpMethodName; | ||
this.grpcMethodName = grpcMethodName; | ||
this.requestMarshaller = requestMarshaller; | ||
this.responseMarshaller = responseMarshaller; | ||
this.methodDescriptor = methodDescriptor; | ||
} | ||
|
||
public String getName() { | ||
return "grpc/" + methodDescriptor.getFullMethodName(); | ||
public String getHttpMethodName() { | ||
return httpMethodName; | ||
} | ||
|
||
public String getGrpcMethodName() { | ||
return grpcMethodName; | ||
} | ||
|
||
public GrpcTranscodingMarshaller<Req> getRequestMarshaller() { | ||
return requestMarshaller; | ||
} | ||
|
||
public GrpcTranscodingMarshaller<Resp> getResponseMarshaller() { | ||
return responseMarshaller; | ||
} | ||
|
||
public MethodDescriptor<Req, Resp> getMethodDescriptor() { | ||
return methodDescriptor; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
...rpc/runtime/src/main/java/io/quarkus/grpc/runtime/transcoding/GrpcTranscodingStorage.java
This file was deleted.
Oops, something went wrong.