aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorCarl Mastrangelo <notcarl@google.com>2018-07-12 17:01:47 -0700
committerGitHub <noreply@github.com>2018-07-12 17:01:47 -0700
commit146b6006b3cc003f68100d10da4ffce8225cc31d (patch)
tree239d2295a0ae47eaff0778aaf28049f872835447 /compiler
parent9925049dceb03fea2077f1e24d78e4d9616df76d (diff)
downloadgrpc-grpc-java-146b6006b3cc003f68100d10da4ffce8225cc31d.tar.gz
compiler,stub: update RpcMethod docs and usage
Diffstat (limited to 'compiler')
-rw-r--r--compiler/src/java_plugin/cpp/java_generator.cpp3
-rw-r--r--compiler/src/test/golden/TestService.java.txt18
-rw-r--r--compiler/src/testLite/golden/TestService.java.txt18
3 files changed, 13 insertions, 26 deletions
diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp
index ecc3df7c3..7d5ba6f35 100644
--- a/compiler/src/java_plugin/cpp/java_generator.cpp
+++ b/compiler/src/java_plugin/cpp/java_generator.cpp
@@ -478,8 +478,7 @@ static void PrintMethodFields(
" $output_type$> $method_new_field_name$;\n"
"\n"
"@$RpcMethod$(\n"
- " fullServiceName = \"$Package$$service_name$\",\n"
- " methodName = \"$method_name$\",\n"
+ " fullMethodName = SERVICE_NAME + '/' + \"$method_name$\",\n"
" requestType = $input_type$.class,\n"
" responseType = $output_type$.class,\n"
" methodType = $MethodType$.$method_type$)\n"
diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt
index d41733f03..274de9348 100644
--- a/compiler/src/test/golden/TestService.java.txt
+++ b/compiler/src/test/golden/TestService.java.txt
@@ -34,8 +34,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.SimpleResponse> getUnaryCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "UnaryCall",
+ fullMethodName = SERVICE_NAME + '/' + "UnaryCall",
requestType = io.grpc.testing.compiler.Test.SimpleRequest.class,
responseType = io.grpc.testing.compiler.Test.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@@ -67,8 +66,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getStreamingOutputCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "StreamingOutputCall",
+ fullMethodName = SERVICE_NAME + '/' + "StreamingOutputCall",
requestType = io.grpc.testing.compiler.Test.StreamingOutputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingOutputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
@@ -100,8 +98,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingInputCallResponse> getStreamingInputCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "StreamingInputCall",
+ fullMethodName = SERVICE_NAME + '/' + "StreamingInputCall",
requestType = io.grpc.testing.compiler.Test.StreamingInputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingInputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
@@ -133,8 +130,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getFullBidiCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "FullBidiCall",
+ fullMethodName = SERVICE_NAME + '/' + "FullBidiCall",
requestType = io.grpc.testing.compiler.Test.StreamingOutputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingOutputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
@@ -166,8 +162,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getHalfBidiCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "HalfBidiCall",
+ fullMethodName = SERVICE_NAME + '/' + "HalfBidiCall",
requestType = io.grpc.testing.compiler.Test.StreamingOutputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingOutputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
@@ -199,8 +194,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingInputCallResponse> getImportMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "Import",
+ fullMethodName = SERVICE_NAME + '/' + "Import",
requestType = io.grpc.testing.compiler.Test.StreamingInputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingInputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
diff --git a/compiler/src/testLite/golden/TestService.java.txt b/compiler/src/testLite/golden/TestService.java.txt
index 86653f973..fde613a34 100644
--- a/compiler/src/testLite/golden/TestService.java.txt
+++ b/compiler/src/testLite/golden/TestService.java.txt
@@ -34,8 +34,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.SimpleResponse> getUnaryCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "UnaryCall",
+ fullMethodName = SERVICE_NAME + '/' + "UnaryCall",
requestType = io.grpc.testing.compiler.Test.SimpleRequest.class,
responseType = io.grpc.testing.compiler.Test.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@@ -66,8 +65,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getStreamingOutputCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "StreamingOutputCall",
+ fullMethodName = SERVICE_NAME + '/' + "StreamingOutputCall",
requestType = io.grpc.testing.compiler.Test.StreamingOutputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingOutputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
@@ -98,8 +96,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingInputCallResponse> getStreamingInputCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "StreamingInputCall",
+ fullMethodName = SERVICE_NAME + '/' + "StreamingInputCall",
requestType = io.grpc.testing.compiler.Test.StreamingInputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingInputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
@@ -130,8 +127,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getFullBidiCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "FullBidiCall",
+ fullMethodName = SERVICE_NAME + '/' + "FullBidiCall",
requestType = io.grpc.testing.compiler.Test.StreamingOutputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingOutputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
@@ -162,8 +158,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingOutputCallResponse> getHalfBidiCallMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "HalfBidiCall",
+ fullMethodName = SERVICE_NAME + '/' + "HalfBidiCall",
requestType = io.grpc.testing.compiler.Test.StreamingOutputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingOutputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
@@ -194,8 +189,7 @@ public final class TestServiceGrpc {
io.grpc.testing.compiler.Test.StreamingInputCallResponse> getImportMethod;
@io.grpc.stub.annotations.RpcMethod(
- fullServiceName = "grpc.testing.compiler.TestService",
- methodName = "Import",
+ fullMethodName = SERVICE_NAME + '/' + "Import",
requestType = io.grpc.testing.compiler.Test.StreamingInputCallRequest.class,
responseType = io.grpc.testing.compiler.Test.StreamingInputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)