compiler,stub: update RpcMethod docs and usage

This commit is contained in:
Carl Mastrangelo 2018-07-12 17:01:47 -07:00 committed by GitHub
parent 9925049dce
commit 146b6006b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 70 additions and 119 deletions

View File

@ -31,8 +31,7 @@ public final class HandshakerServiceGrpc {
io.grpc.alts.internal.Handshaker.HandshakerResp> getDoHandshakeMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.gcp.HandshakerService",
methodName = "DoHandshake",
fullMethodName = SERVICE_NAME + '/' + "DoHandshake",
requestType = io.grpc.alts.internal.Handshaker.HandshakerReq.class,
responseType = io.grpc.alts.internal.Handshaker.HandshakerResp.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)

View File

@ -31,8 +31,7 @@ public final class BenchmarkServiceGrpc {
io.grpc.benchmarks.proto.Messages.SimpleResponse> getUnaryCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.BenchmarkService",
methodName = "UnaryCall",
fullMethodName = SERVICE_NAME + '/' + "UnaryCall",
requestType = io.grpc.benchmarks.proto.Messages.SimpleRequest.class,
responseType = io.grpc.benchmarks.proto.Messages.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -64,8 +63,7 @@ public final class BenchmarkServiceGrpc {
io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.BenchmarkService",
methodName = "StreamingCall",
fullMethodName = SERVICE_NAME + '/' + "StreamingCall",
requestType = io.grpc.benchmarks.proto.Messages.SimpleRequest.class,
responseType = io.grpc.benchmarks.proto.Messages.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
@ -97,8 +95,7 @@ public final class BenchmarkServiceGrpc {
io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingFromClientMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.BenchmarkService",
methodName = "StreamingFromClient",
fullMethodName = SERVICE_NAME + '/' + "StreamingFromClient",
requestType = io.grpc.benchmarks.proto.Messages.SimpleRequest.class,
responseType = io.grpc.benchmarks.proto.Messages.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
@ -130,8 +127,7 @@ public final class BenchmarkServiceGrpc {
io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingFromServerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.BenchmarkService",
methodName = "StreamingFromServer",
fullMethodName = SERVICE_NAME + '/' + "StreamingFromServer",
requestType = io.grpc.benchmarks.proto.Messages.SimpleRequest.class,
responseType = io.grpc.benchmarks.proto.Messages.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
@ -163,8 +159,7 @@ public final class BenchmarkServiceGrpc {
io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingBothWaysMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.BenchmarkService",
methodName = "StreamingBothWays",
fullMethodName = SERVICE_NAME + '/' + "StreamingBothWays",
requestType = io.grpc.benchmarks.proto.Messages.SimpleRequest.class,
responseType = io.grpc.benchmarks.proto.Messages.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)

View File

@ -31,8 +31,7 @@ public final class ReportQpsScenarioServiceGrpc {
io.grpc.benchmarks.proto.Control.Void> getReportScenarioMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.ReportQpsScenarioService",
methodName = "ReportScenario",
fullMethodName = SERVICE_NAME + '/' + "ReportScenario",
requestType = io.grpc.benchmarks.proto.Control.ScenarioResult.class,
responseType = io.grpc.benchmarks.proto.Control.Void.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -31,8 +31,7 @@ public final class WorkerServiceGrpc {
io.grpc.benchmarks.proto.Control.ServerStatus> getRunServerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.WorkerService",
methodName = "RunServer",
fullMethodName = SERVICE_NAME + '/' + "RunServer",
requestType = io.grpc.benchmarks.proto.Control.ServerArgs.class,
responseType = io.grpc.benchmarks.proto.Control.ServerStatus.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
@ -64,8 +63,7 @@ public final class WorkerServiceGrpc {
io.grpc.benchmarks.proto.Control.ClientStatus> getRunClientMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.WorkerService",
methodName = "RunClient",
fullMethodName = SERVICE_NAME + '/' + "RunClient",
requestType = io.grpc.benchmarks.proto.Control.ClientArgs.class,
responseType = io.grpc.benchmarks.proto.Control.ClientStatus.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
@ -97,8 +95,7 @@ public final class WorkerServiceGrpc {
io.grpc.benchmarks.proto.Control.CoreResponse> getCoreCountMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.WorkerService",
methodName = "CoreCount",
fullMethodName = SERVICE_NAME + '/' + "CoreCount",
requestType = io.grpc.benchmarks.proto.Control.CoreRequest.class,
responseType = io.grpc.benchmarks.proto.Control.CoreResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -130,8 +127,7 @@ public final class WorkerServiceGrpc {
io.grpc.benchmarks.proto.Control.Void> getQuitWorkerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.WorkerService",
methodName = "QuitWorker",
fullMethodName = SERVICE_NAME + '/' + "QuitWorker",
requestType = io.grpc.benchmarks.proto.Control.Void.class,
responseType = io.grpc.benchmarks.proto.Control.Void.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -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"

View File

@ -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)

View File

@ -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)

View File

@ -365,7 +365,7 @@ public final class MethodDescriptor<ReqT, RespT> {
}
/**
* Generate the fully qualified method name.
* Generate the fully qualified method name. This matches the the name
*
* @param fullServiceName the fully qualified service name that is prefixed with the package name
* @param methodName the short method name

View File

@ -31,8 +31,7 @@ public final class LoadBalancerGrpc {
io.grpc.grpclb.LoadBalanceResponse> getBalanceLoadMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.lb.v1.LoadBalancer",
methodName = "BalanceLoad",
fullMethodName = SERVICE_NAME + '/' + "BalanceLoad",
requestType = io.grpc.grpclb.LoadBalanceRequest.class,
responseType = io.grpc.grpclb.LoadBalanceResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)

View File

@ -31,8 +31,7 @@ public final class MetricsServiceGrpc {
io.grpc.testing.integration.Metrics.GaugeResponse> getGetAllGaugesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.MetricsService",
methodName = "GetAllGauges",
fullMethodName = SERVICE_NAME + '/' + "GetAllGauges",
requestType = io.grpc.testing.integration.Metrics.EmptyMessage.class,
responseType = io.grpc.testing.integration.Metrics.GaugeResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
@ -64,8 +63,7 @@ public final class MetricsServiceGrpc {
io.grpc.testing.integration.Metrics.GaugeResponse> getGetGaugeMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.MetricsService",
methodName = "GetGauge",
fullMethodName = SERVICE_NAME + '/' + "GetGauge",
requestType = io.grpc.testing.integration.Metrics.GaugeRequest.class,
responseType = io.grpc.testing.integration.Metrics.GaugeResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -34,8 +34,7 @@ public final class ReconnectServiceGrpc {
io.grpc.testing.integration.EmptyProtos.Empty> getStartMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.ReconnectService",
methodName = "Start",
fullMethodName = SERVICE_NAME + '/' + "Start",
requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -67,8 +66,7 @@ public final class ReconnectServiceGrpc {
io.grpc.testing.integration.Messages.ReconnectInfo> getStopMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.ReconnectService",
methodName = "Stop",
fullMethodName = SERVICE_NAME + '/' + "Stop",
requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
responseType = io.grpc.testing.integration.Messages.ReconnectInfo.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -35,8 +35,7 @@ public final class TestServiceGrpc {
io.grpc.testing.integration.EmptyProtos.Empty> getEmptyCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.TestService",
methodName = "EmptyCall",
fullMethodName = SERVICE_NAME + '/' + "EmptyCall",
requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -68,8 +67,7 @@ public final class TestServiceGrpc {
io.grpc.testing.integration.Messages.SimpleResponse> getUnaryCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.TestService",
methodName = "UnaryCall",
fullMethodName = SERVICE_NAME + '/' + "UnaryCall",
requestType = io.grpc.testing.integration.Messages.SimpleRequest.class,
responseType = io.grpc.testing.integration.Messages.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -101,8 +99,7 @@ public final class TestServiceGrpc {
io.grpc.testing.integration.Messages.SimpleResponse> getCacheableUnaryCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.TestService",
methodName = "CacheableUnaryCall",
fullMethodName = SERVICE_NAME + '/' + "CacheableUnaryCall",
requestType = io.grpc.testing.integration.Messages.SimpleRequest.class,
responseType = io.grpc.testing.integration.Messages.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -134,8 +131,7 @@ public final class TestServiceGrpc {
io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getStreamingOutputCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.TestService",
methodName = "StreamingOutputCall",
fullMethodName = SERVICE_NAME + '/' + "StreamingOutputCall",
requestType = io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class,
responseType = io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
@ -167,8 +163,7 @@ public final class TestServiceGrpc {
io.grpc.testing.integration.Messages.StreamingInputCallResponse> getStreamingInputCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.TestService",
methodName = "StreamingInputCall",
fullMethodName = SERVICE_NAME + '/' + "StreamingInputCall",
requestType = io.grpc.testing.integration.Messages.StreamingInputCallRequest.class,
responseType = io.grpc.testing.integration.Messages.StreamingInputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
@ -200,8 +195,7 @@ public final class TestServiceGrpc {
io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getFullDuplexCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.TestService",
methodName = "FullDuplexCall",
fullMethodName = SERVICE_NAME + '/' + "FullDuplexCall",
requestType = io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class,
responseType = io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
@ -233,8 +227,7 @@ public final class TestServiceGrpc {
io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getHalfDuplexCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.TestService",
methodName = "HalfDuplexCall",
fullMethodName = SERVICE_NAME + '/' + "HalfDuplexCall",
requestType = io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class,
responseType = io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
@ -266,8 +259,7 @@ public final class TestServiceGrpc {
io.grpc.testing.integration.EmptyProtos.Empty> getUnimplementedCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.TestService",
methodName = "UnimplementedCall",
fullMethodName = SERVICE_NAME + '/' + "UnimplementedCall",
requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -35,8 +35,7 @@ public final class UnimplementedServiceGrpc {
io.grpc.testing.integration.EmptyProtos.Empty> getUnimplementedCallMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.UnimplementedService",
methodName = "UnimplementedCall",
fullMethodName = SERVICE_NAME + '/' + "UnimplementedCall",
requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -35,8 +35,7 @@ public final class ChannelzGrpc {
io.grpc.channelz.v1.GetTopChannelsResponse> getGetTopChannelsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.channelz.v1.Channelz",
methodName = "GetTopChannels",
fullMethodName = SERVICE_NAME + '/' + "GetTopChannels",
requestType = io.grpc.channelz.v1.GetTopChannelsRequest.class,
responseType = io.grpc.channelz.v1.GetTopChannelsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -68,8 +67,7 @@ public final class ChannelzGrpc {
io.grpc.channelz.v1.GetServersResponse> getGetServersMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.channelz.v1.Channelz",
methodName = "GetServers",
fullMethodName = SERVICE_NAME + '/' + "GetServers",
requestType = io.grpc.channelz.v1.GetServersRequest.class,
responseType = io.grpc.channelz.v1.GetServersResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -101,8 +99,7 @@ public final class ChannelzGrpc {
io.grpc.channelz.v1.GetServerSocketsResponse> getGetServerSocketsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.channelz.v1.Channelz",
methodName = "GetServerSockets",
fullMethodName = SERVICE_NAME + '/' + "GetServerSockets",
requestType = io.grpc.channelz.v1.GetServerSocketsRequest.class,
responseType = io.grpc.channelz.v1.GetServerSocketsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -134,8 +131,7 @@ public final class ChannelzGrpc {
io.grpc.channelz.v1.GetChannelResponse> getGetChannelMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.channelz.v1.Channelz",
methodName = "GetChannel",
fullMethodName = SERVICE_NAME + '/' + "GetChannel",
requestType = io.grpc.channelz.v1.GetChannelRequest.class,
responseType = io.grpc.channelz.v1.GetChannelResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -167,8 +163,7 @@ public final class ChannelzGrpc {
io.grpc.channelz.v1.GetSubchannelResponse> getGetSubchannelMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.channelz.v1.Channelz",
methodName = "GetSubchannel",
fullMethodName = SERVICE_NAME + '/' + "GetSubchannel",
requestType = io.grpc.channelz.v1.GetSubchannelRequest.class,
responseType = io.grpc.channelz.v1.GetSubchannelResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -200,8 +195,7 @@ public final class ChannelzGrpc {
io.grpc.channelz.v1.GetSocketResponse> getGetSocketMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.channelz.v1.Channelz",
methodName = "GetSocket",
fullMethodName = SERVICE_NAME + '/' + "GetSocket",
requestType = io.grpc.channelz.v1.GetSocketRequest.class,
responseType = io.grpc.channelz.v1.GetSocketResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -31,8 +31,7 @@ public final class HealthGrpc {
io.grpc.health.v1.HealthCheckResponse> getCheckMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.health.v1.Health",
methodName = "Check",
fullMethodName = SERVICE_NAME + '/' + "Check",
requestType = io.grpc.health.v1.HealthCheckRequest.class,
responseType = io.grpc.health.v1.HealthCheckResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -31,8 +31,7 @@ public final class ServerReflectionGrpc {
io.grpc.reflection.v1alpha.ServerReflectionResponse> getServerReflectionInfoMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.reflection.v1alpha.ServerReflection",
methodName = "ServerReflectionInfo",
fullMethodName = SERVICE_NAME + '/' + "ServerReflectionInfo",
requestType = io.grpc.reflection.v1alpha.ServerReflectionRequest.class,
responseType = io.grpc.reflection.v1alpha.ServerReflectionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)

View File

@ -34,8 +34,7 @@ public final class AnotherDynamicServiceGrpc {
io.grpc.reflection.testing.DynamicReply> getMethodMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.reflection.testing.AnotherDynamicService",
methodName = "Method",
fullMethodName = SERVICE_NAME + '/' + "Method",
requestType = io.grpc.reflection.testing.DynamicRequest.class,
responseType = io.grpc.reflection.testing.DynamicReply.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -34,8 +34,7 @@ public final class DynamicServiceGrpc {
io.grpc.reflection.testing.DynamicReply> getMethodMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.reflection.testing.DynamicService",
methodName = "Method",
fullMethodName = SERVICE_NAME + '/' + "Method",
requestType = io.grpc.reflection.testing.DynamicRequest.class,
responseType = io.grpc.reflection.testing.DynamicReply.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -31,8 +31,7 @@ public final class ReflectableServiceGrpc {
io.grpc.reflection.testing.Reply> getMethodMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.reflection.testing.ReflectableService",
methodName = "Method",
fullMethodName = SERVICE_NAME + '/' + "Method",
requestType = io.grpc.reflection.testing.Request.class,
responseType = io.grpc.reflection.testing.Reply.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)

View File

@ -29,8 +29,8 @@ import java.lang.annotation.Target;
*
* <p>
* This annotation is used by the gRPC stub compiler to annotate {@link MethodDescriptor}
* getters. Users should not annotate their own classes with annotation. Not all stubs may have
* this annotation, so consumers should not assume that it is present.
* getters. Users should not annotate their own classes with this annotation. Not all stubs may
* have this annotation, so consumers should not assume that it is present.
* </p>
*
* @since 1.14.0
@ -40,27 +40,31 @@ import java.lang.annotation.Target;
public @interface RpcMethod {
/**
* The full service name for the method
* The fully qualified method name. This should match the name as returned by
* {@link MethodDescriptor#generateFullMethodName(String, String)}.
*/
String fullServiceName();
String fullMethodName();
/**
* The method name for the method
*/
String methodName();
/**
* The request type of the method
* The request type of the method. The request type class should be assignable from (i.e.
* {@link Class#isAssignableFrom(Class)} the request type {@code ReqT} of the
* {@link MethodDescriptor}. Additionally, if the request {@code MethodDescriptor.Marshaller}
* is a {@code MethodDescriptor.ReflectableMarshaller}, the request type should be assignable
* from {@code MethodDescriptor.ReflectableMarshaller#getMessageClass()}.
*/
Class<?> requestType();
/**
* The response type of the method
* The response type of the method. The response type class should be assignable from (i.e.
* {@link Class#isAssignableFrom(Class)} the response type {@code RespT} of the
* {@link MethodDescriptor}. Additionally, if the response {@code MethodDescriptor.Marshaller}
* is a {@code MethodDescriptor.ReflectableMarshaller}, the response type should be assignable
* from {@code MethodDescriptor.ReflectableMarshaller#getMessageClass()}.
*/
Class<?> responseType();
/**
* The call type of the method
* The call type of the method.
*/
MethodDescriptor.MethodType methodType();
}

View File

@ -34,8 +34,7 @@ public final class SimpleServiceGrpc {
io.grpc.testing.protobuf.SimpleResponse> getUnaryRpcMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.SimpleService",
methodName = "UnaryRpc",
fullMethodName = SERVICE_NAME + '/' + "UnaryRpc",
requestType = io.grpc.testing.protobuf.SimpleRequest.class,
responseType = io.grpc.testing.protobuf.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
@ -67,8 +66,7 @@ public final class SimpleServiceGrpc {
io.grpc.testing.protobuf.SimpleResponse> getClientStreamingRpcMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.SimpleService",
methodName = "ClientStreamingRpc",
fullMethodName = SERVICE_NAME + '/' + "ClientStreamingRpc",
requestType = io.grpc.testing.protobuf.SimpleRequest.class,
responseType = io.grpc.testing.protobuf.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
@ -100,8 +98,7 @@ public final class SimpleServiceGrpc {
io.grpc.testing.protobuf.SimpleResponse> getServerStreamingRpcMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.SimpleService",
methodName = "ServerStreamingRpc",
fullMethodName = SERVICE_NAME + '/' + "ServerStreamingRpc",
requestType = io.grpc.testing.protobuf.SimpleRequest.class,
responseType = io.grpc.testing.protobuf.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
@ -133,8 +130,7 @@ public final class SimpleServiceGrpc {
io.grpc.testing.protobuf.SimpleResponse> getBidiStreamingRpcMethod;
@io.grpc.stub.annotations.RpcMethod(
fullServiceName = "grpc.testing.SimpleService",
methodName = "BidiStreamingRpc",
fullMethodName = SERVICE_NAME + '/' + "BidiStreamingRpc",
requestType = io.grpc.testing.protobuf.SimpleRequest.class,
responseType = io.grpc.testing.protobuf.SimpleResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)