From 66fca46371949daab9d073056f8106922e06200d Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Thu, 8 Feb 2018 11:16:44 -0800 Subject: [PATCH] compiler: avoid invoking experimental method in generated code --- .../proto/BenchmarkServiceGrpc.java | 81 ++++++---- .../proto/ReportQpsScenarioServiceGrpc.java | 19 ++- .../benchmarks/proto/WorkerServiceGrpc.java | 68 ++++++--- .../src/java_plugin/cpp/java_generator.cpp | 39 +++-- compiler/src/test/golden/TestService.java.txt | 81 ++++++---- .../src/testLite/golden/TestService.java.txt | 81 ++++++---- .../src/testNano/golden/TestService.java.txt | 81 ++++++---- .../grpc/io/grpc/grpclb/LoadBalancerGrpc.java | 15 +- .../integration/MetricsServiceGrpc.java | 36 +++-- .../integration/ReconnectServiceGrpc.java | 38 +++-- .../testing/integration/TestServiceGrpc.java | 138 +++++++++++------- .../integration/UnimplementedServiceGrpc.java | 19 ++- .../grpc/io/grpc/health/v1/HealthGrpc.java | 19 ++- .../v1alpha/MonitoringGrpc.java | 93 +++++++----- .../v1alpha/ServerReflectionGrpc.java | 15 +- .../testing/AnotherDynamicServiceGrpc.java | 19 ++- .../testing/DynamicServiceGrpc.java | 19 ++- .../testing/ReflectableServiceGrpc.java | 19 ++- .../testing/protobuf/SimpleServiceGrpc.java | 66 ++++++--- 19 files changed, 613 insertions(+), 333 deletions(-) diff --git a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java index 39a5555dd31..ce9c269adcd 100644 --- a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java +++ b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/BenchmarkServiceGrpc.java @@ -30,7 +30,7 @@ private BenchmarkServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getUnaryCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_UNARY_CALL = getUnaryCallMethod(); + io.grpc.benchmarks.proto.Messages.SimpleResponse> METHOD_UNARY_CALL = getUnaryCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; @@ -38,6 +38,11 @@ private BenchmarkServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getUnaryCallMethod() { + return getUnaryCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { io.grpc.MethodDescriptor getUnaryCallMethod; if ((getUnaryCallMethod = BenchmarkServiceGrpc.getUnaryCallMethod) == null) { synchronized (BenchmarkServiceGrpc.class) { @@ -62,7 +67,7 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getUnaryCallMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_CALL = getStreamingCallMethod(); + io.grpc.benchmarks.proto.Messages.SimpleResponse> METHOD_STREAMING_CALL = getStreamingCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingCallMethod; @@ -70,6 +75,11 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getUnaryCallMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingCallMethod() { + return getStreamingCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingCallMethodHelper() { io.grpc.MethodDescriptor getStreamingCallMethod; if ((getStreamingCallMethod = BenchmarkServiceGrpc.getStreamingCallMethod) == null) { synchronized (BenchmarkServiceGrpc.class) { @@ -94,7 +104,7 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingCallMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingFromClientMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_FROM_CLIENT = getStreamingFromClientMethod(); + io.grpc.benchmarks.proto.Messages.SimpleResponse> METHOD_STREAMING_FROM_CLIENT = getStreamingFromClientMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingFromClientMethod; @@ -102,6 +112,11 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingCallMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingFromClientMethod() { + return getStreamingFromClientMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingFromClientMethodHelper() { io.grpc.MethodDescriptor getStreamingFromClientMethod; if ((getStreamingFromClientMethod = BenchmarkServiceGrpc.getStreamingFromClientMethod) == null) { synchronized (BenchmarkServiceGrpc.class) { @@ -126,7 +141,7 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingFromClientMethod() @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingFromServerMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_FROM_SERVER = getStreamingFromServerMethod(); + io.grpc.benchmarks.proto.Messages.SimpleResponse> METHOD_STREAMING_FROM_SERVER = getStreamingFromServerMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingFromServerMethod; @@ -134,6 +149,11 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingFromClientMethod() @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingFromServerMethod() { + return getStreamingFromServerMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingFromServerMethodHelper() { io.grpc.MethodDescriptor getStreamingFromServerMethod; if ((getStreamingFromServerMethod = BenchmarkServiceGrpc.getStreamingFromServerMethod) == null) { synchronized (BenchmarkServiceGrpc.class) { @@ -158,7 +178,7 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingFromServerMethod() @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingBothWaysMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_BOTH_WAYS = getStreamingBothWaysMethod(); + io.grpc.benchmarks.proto.Messages.SimpleResponse> METHOD_STREAMING_BOTH_WAYS = getStreamingBothWaysMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingBothWaysMethod; @@ -166,6 +186,11 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingFromServerMethod() @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingBothWaysMethod() { + return getStreamingBothWaysMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingBothWaysMethodHelper() { io.grpc.MethodDescriptor getStreamingBothWaysMethod; if ((getStreamingBothWaysMethod = BenchmarkServiceGrpc.getStreamingBothWaysMethod) == null) { synchronized (BenchmarkServiceGrpc.class) { @@ -223,7 +248,7 @@ public static abstract class BenchmarkServiceImplBase implements io.grpc.Bindabl */ public void unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getUnaryCallMethodHelper(), responseObserver); } /** @@ -235,7 +260,7 @@ public void unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request, */ public io.grpc.stub.StreamObserver streamingCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getStreamingCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getStreamingCallMethodHelper(), responseObserver); } /** @@ -246,7 +271,7 @@ public io.grpc.stub.StreamObserver streamingFromClient( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getStreamingFromClientMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getStreamingFromClientMethodHelper(), responseObserver); } /** @@ -257,7 +282,7 @@ public io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getStreamingFromServerMethod(), responseObserver); + asyncUnimplementedUnaryCall(getStreamingFromServerMethodHelper(), responseObserver); } /** @@ -268,41 +293,41 @@ public void streamingFromServer(io.grpc.benchmarks.proto.Messages.SimpleRequest */ public io.grpc.stub.StreamObserver streamingBothWays( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getStreamingBothWaysMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getStreamingBothWaysMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getUnaryCallMethod(), + getUnaryCallMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.benchmarks.proto.Messages.SimpleRequest, io.grpc.benchmarks.proto.Messages.SimpleResponse>( this, METHODID_UNARY_CALL))) .addMethod( - getStreamingCallMethod(), + getStreamingCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.benchmarks.proto.Messages.SimpleRequest, io.grpc.benchmarks.proto.Messages.SimpleResponse>( this, METHODID_STREAMING_CALL))) .addMethod( - getStreamingFromClientMethod(), + getStreamingFromClientMethodHelper(), asyncClientStreamingCall( new MethodHandlers< io.grpc.benchmarks.proto.Messages.SimpleRequest, io.grpc.benchmarks.proto.Messages.SimpleResponse>( this, METHODID_STREAMING_FROM_CLIENT))) .addMethod( - getStreamingFromServerMethod(), + getStreamingFromServerMethodHelper(), asyncServerStreamingCall( new MethodHandlers< io.grpc.benchmarks.proto.Messages.SimpleRequest, io.grpc.benchmarks.proto.Messages.SimpleResponse>( this, METHODID_STREAMING_FROM_SERVER))) .addMethod( - getStreamingBothWaysMethod(), + getStreamingBothWaysMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.benchmarks.proto.Messages.SimpleRequest, @@ -339,7 +364,7 @@ protected BenchmarkServiceStub build(io.grpc.Channel channel, public void unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -352,7 +377,7 @@ public void unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request, public io.grpc.stub.StreamObserver streamingCall( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getStreamingCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getStreamingCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -364,7 +389,7 @@ public io.grpc.stub.StreamObserver streamingFromClient( io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( - getChannel().newCall(getStreamingFromClientMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getStreamingFromClientMethodHelper(), getCallOptions()), responseObserver); } /** @@ -376,7 +401,7 @@ public io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( - getChannel().newCall(getStreamingFromServerMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getStreamingFromServerMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -388,7 +413,7 @@ public void streamingFromServer(io.grpc.benchmarks.proto.Messages.SimpleRequest public io.grpc.stub.StreamObserver streamingBothWays( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getStreamingBothWaysMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getStreamingBothWaysMethodHelper(), getCallOptions()), responseObserver); } } @@ -418,7 +443,7 @@ protected BenchmarkServiceBlockingStub build(io.grpc.Channel channel, */ public io.grpc.benchmarks.proto.Messages.SimpleResponse unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request) { return blockingUnaryCall( - getChannel(), getUnaryCallMethod(), getCallOptions(), request); + getChannel(), getUnaryCallMethodHelper(), getCallOptions(), request); } /** @@ -430,7 +455,7 @@ public io.grpc.benchmarks.proto.Messages.SimpleResponse unaryCall(io.grpc.benchm public java.util.Iterator streamingFromServer( io.grpc.benchmarks.proto.Messages.SimpleRequest request) { return blockingServerStreamingCall( - getChannel(), getStreamingFromServerMethod(), getCallOptions(), request); + getChannel(), getStreamingFromServerMethodHelper(), getCallOptions(), request); } } @@ -461,7 +486,7 @@ protected BenchmarkServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.benchmarks.proto.Messages.SimpleRequest request) { return futureUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request); } } @@ -566,11 +591,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new BenchmarkServiceFileDescriptorSupplier()) - .addMethod(getUnaryCallMethod()) - .addMethod(getStreamingCallMethod()) - .addMethod(getStreamingFromClientMethod()) - .addMethod(getStreamingFromServerMethod()) - .addMethod(getStreamingBothWaysMethod()) + .addMethod(getUnaryCallMethodHelper()) + .addMethod(getStreamingCallMethodHelper()) + .addMethod(getStreamingFromClientMethodHelper()) + .addMethod(getStreamingFromServerMethodHelper()) + .addMethod(getStreamingBothWaysMethodHelper()) .build(); } } diff --git a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/ReportQpsScenarioServiceGrpc.java b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/ReportQpsScenarioServiceGrpc.java index 65fa3f3b363..53cd0260da7 100644 --- a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/ReportQpsScenarioServiceGrpc.java +++ b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/ReportQpsScenarioServiceGrpc.java @@ -30,7 +30,7 @@ private ReportQpsScenarioServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getReportScenarioMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_REPORT_SCENARIO = getReportScenarioMethod(); + io.grpc.benchmarks.proto.Control.Void> METHOD_REPORT_SCENARIO = getReportScenarioMethodHelper(); private static volatile io.grpc.MethodDescriptor getReportScenarioMethod; @@ -38,6 +38,11 @@ private ReportQpsScenarioServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getReportScenarioMethod() { + return getReportScenarioMethodHelper(); + } + + private static io.grpc.MethodDescriptor getReportScenarioMethodHelper() { io.grpc.MethodDescriptor getReportScenarioMethod; if ((getReportScenarioMethod = ReportQpsScenarioServiceGrpc.getReportScenarioMethod) == null) { synchronized (ReportQpsScenarioServiceGrpc.class) { @@ -94,13 +99,13 @@ public static abstract class ReportQpsScenarioServiceImplBase implements io.grpc */ public void reportScenario(io.grpc.benchmarks.proto.Control.ScenarioResult request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getReportScenarioMethod(), responseObserver); + asyncUnimplementedUnaryCall(getReportScenarioMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getReportScenarioMethod(), + getReportScenarioMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.benchmarks.proto.Control.ScenarioResult, @@ -136,7 +141,7 @@ protected ReportQpsScenarioServiceStub build(io.grpc.Channel channel, public void reportScenario(io.grpc.benchmarks.proto.Control.ScenarioResult request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getReportScenarioMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getReportScenarioMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -165,7 +170,7 @@ protected ReportQpsScenarioServiceBlockingStub build(io.grpc.Channel channel, */ public io.grpc.benchmarks.proto.Control.Void reportScenario(io.grpc.benchmarks.proto.Control.ScenarioResult request) { return blockingUnaryCall( - getChannel(), getReportScenarioMethod(), getCallOptions(), request); + getChannel(), getReportScenarioMethodHelper(), getCallOptions(), request); } } @@ -195,7 +200,7 @@ protected ReportQpsScenarioServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture reportScenario( io.grpc.benchmarks.proto.Control.ScenarioResult request) { return futureUnaryCall( - getChannel().newCall(getReportScenarioMethod(), getCallOptions()), request); + getChannel().newCall(getReportScenarioMethodHelper(), getCallOptions()), request); } } @@ -283,7 +288,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ReportQpsScenarioServiceFileDescriptorSupplier()) - .addMethod(getReportScenarioMethod()) + .addMethod(getReportScenarioMethodHelper()) .build(); } } diff --git a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java index 6cbd02388ac..8d8059a6b81 100644 --- a/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java +++ b/benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/WorkerServiceGrpc.java @@ -30,7 +30,7 @@ private WorkerServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getRunServerMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_RUN_SERVER = getRunServerMethod(); + io.grpc.benchmarks.proto.Control.ServerStatus> METHOD_RUN_SERVER = getRunServerMethodHelper(); private static volatile io.grpc.MethodDescriptor getRunServerMethod; @@ -38,6 +38,11 @@ private WorkerServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getRunServerMethod() { + return getRunServerMethodHelper(); + } + + private static io.grpc.MethodDescriptor getRunServerMethodHelper() { io.grpc.MethodDescriptor getRunServerMethod; if ((getRunServerMethod = WorkerServiceGrpc.getRunServerMethod) == null) { synchronized (WorkerServiceGrpc.class) { @@ -62,7 +67,7 @@ io.grpc.benchmarks.proto.Control.ServerStatus> getRunServerMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getRunClientMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_RUN_CLIENT = getRunClientMethod(); + io.grpc.benchmarks.proto.Control.ClientStatus> METHOD_RUN_CLIENT = getRunClientMethodHelper(); private static volatile io.grpc.MethodDescriptor getRunClientMethod; @@ -70,6 +75,11 @@ io.grpc.benchmarks.proto.Control.ServerStatus> getRunServerMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getRunClientMethod() { + return getRunClientMethodHelper(); + } + + private static io.grpc.MethodDescriptor getRunClientMethodHelper() { io.grpc.MethodDescriptor getRunClientMethod; if ((getRunClientMethod = WorkerServiceGrpc.getRunClientMethod) == null) { synchronized (WorkerServiceGrpc.class) { @@ -94,7 +104,7 @@ io.grpc.benchmarks.proto.Control.ClientStatus> getRunClientMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getCoreCountMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_CORE_COUNT = getCoreCountMethod(); + io.grpc.benchmarks.proto.Control.CoreResponse> METHOD_CORE_COUNT = getCoreCountMethodHelper(); private static volatile io.grpc.MethodDescriptor getCoreCountMethod; @@ -102,6 +112,11 @@ io.grpc.benchmarks.proto.Control.ClientStatus> getRunClientMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getCoreCountMethod() { + return getCoreCountMethodHelper(); + } + + private static io.grpc.MethodDescriptor getCoreCountMethodHelper() { io.grpc.MethodDescriptor getCoreCountMethod; if ((getCoreCountMethod = WorkerServiceGrpc.getCoreCountMethod) == null) { synchronized (WorkerServiceGrpc.class) { @@ -126,7 +141,7 @@ io.grpc.benchmarks.proto.Control.CoreResponse> getCoreCountMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getQuitWorkerMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_QUIT_WORKER = getQuitWorkerMethod(); + io.grpc.benchmarks.proto.Control.Void> METHOD_QUIT_WORKER = getQuitWorkerMethodHelper(); private static volatile io.grpc.MethodDescriptor getQuitWorkerMethod; @@ -134,6 +149,11 @@ io.grpc.benchmarks.proto.Control.CoreResponse> getCoreCountMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getQuitWorkerMethod() { + return getQuitWorkerMethodHelper(); + } + + private static io.grpc.MethodDescriptor getQuitWorkerMethodHelper() { io.grpc.MethodDescriptor getQuitWorkerMethod; if ((getQuitWorkerMethod = WorkerServiceGrpc.getQuitWorkerMethod) == null) { synchronized (WorkerServiceGrpc.class) { @@ -195,7 +215,7 @@ public static abstract class WorkerServiceImplBase implements io.grpc.BindableSe */ public io.grpc.stub.StreamObserver runServer( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getRunServerMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getRunServerMethodHelper(), responseObserver); } /** @@ -210,7 +230,7 @@ public io.grpc.stub.StreamObserver */ public io.grpc.stub.StreamObserver runClient( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getRunClientMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getRunClientMethodHelper(), responseObserver); } /** @@ -220,7 +240,7 @@ public io.grpc.stub.StreamObserver */ public void coreCount(io.grpc.benchmarks.proto.Control.CoreRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCoreCountMethod(), responseObserver); + asyncUnimplementedUnaryCall(getCoreCountMethodHelper(), responseObserver); } /** @@ -230,34 +250,34 @@ public void coreCount(io.grpc.benchmarks.proto.Control.CoreRequest request, */ public void quitWorker(io.grpc.benchmarks.proto.Control.Void request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getQuitWorkerMethod(), responseObserver); + asyncUnimplementedUnaryCall(getQuitWorkerMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getRunServerMethod(), + getRunServerMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.benchmarks.proto.Control.ServerArgs, io.grpc.benchmarks.proto.Control.ServerStatus>( this, METHODID_RUN_SERVER))) .addMethod( - getRunClientMethod(), + getRunClientMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.benchmarks.proto.Control.ClientArgs, io.grpc.benchmarks.proto.Control.ClientStatus>( this, METHODID_RUN_CLIENT))) .addMethod( - getCoreCountMethod(), + getCoreCountMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.benchmarks.proto.Control.CoreRequest, io.grpc.benchmarks.proto.Control.CoreResponse>( this, METHODID_CORE_COUNT))) .addMethod( - getQuitWorkerMethod(), + getQuitWorkerMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.benchmarks.proto.Control.Void, @@ -298,7 +318,7 @@ protected WorkerServiceStub build(io.grpc.Channel channel, public io.grpc.stub.StreamObserver runServer( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getRunServerMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getRunServerMethodHelper(), getCallOptions()), responseObserver); } /** @@ -314,7 +334,7 @@ public io.grpc.stub.StreamObserver public io.grpc.stub.StreamObserver runClient( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getRunClientMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getRunClientMethodHelper(), getCallOptions()), responseObserver); } /** @@ -325,7 +345,7 @@ public io.grpc.stub.StreamObserver public void coreCount(io.grpc.benchmarks.proto.Control.CoreRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCoreCountMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getCoreCountMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -336,7 +356,7 @@ public void coreCount(io.grpc.benchmarks.proto.Control.CoreRequest request, public void quitWorker(io.grpc.benchmarks.proto.Control.Void request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getQuitWorkerMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getQuitWorkerMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -365,7 +385,7 @@ protected WorkerServiceBlockingStub build(io.grpc.Channel channel, */ public io.grpc.benchmarks.proto.Control.CoreResponse coreCount(io.grpc.benchmarks.proto.Control.CoreRequest request) { return blockingUnaryCall( - getChannel(), getCoreCountMethod(), getCallOptions(), request); + getChannel(), getCoreCountMethodHelper(), getCallOptions(), request); } /** @@ -375,7 +395,7 @@ public io.grpc.benchmarks.proto.Control.CoreResponse coreCount(io.grpc.benchmark */ public io.grpc.benchmarks.proto.Control.Void quitWorker(io.grpc.benchmarks.proto.Control.Void request) { return blockingUnaryCall( - getChannel(), getQuitWorkerMethod(), getCallOptions(), request); + getChannel(), getQuitWorkerMethodHelper(), getCallOptions(), request); } } @@ -405,7 +425,7 @@ protected WorkerServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture coreCount( io.grpc.benchmarks.proto.Control.CoreRequest request) { return futureUnaryCall( - getChannel().newCall(getCoreCountMethod(), getCallOptions()), request); + getChannel().newCall(getCoreCountMethodHelper(), getCallOptions()), request); } /** @@ -416,7 +436,7 @@ public com.google.common.util.concurrent.ListenableFuture quitWorker( io.grpc.benchmarks.proto.Control.Void request) { return futureUnaryCall( - getChannel().newCall(getQuitWorkerMethod(), getCallOptions()), request); + getChannel().newCall(getQuitWorkerMethodHelper(), getCallOptions()), request); } } @@ -517,10 +537,10 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new WorkerServiceFileDescriptorSupplier()) - .addMethod(getRunServerMethod()) - .addMethod(getRunClientMethod()) - .addMethod(getCoreCountMethod()) - .addMethod(getQuitWorkerMethod()) + .addMethod(getRunServerMethodHelper()) + .addMethod(getRunClientMethodHelper()) + .addMethod(getCoreCountMethodHelper()) + .addMethod(getQuitWorkerMethodHelper()) .build(); } } diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp index ad818b532e8..7cb01238ac9 100644 --- a/compiler/src/java_plugin/cpp/java_generator.cpp +++ b/compiler/src/java_plugin/cpp/java_generator.cpp @@ -78,6 +78,10 @@ static inline string MethodPropertiesGetterName(const MethodDescriptor* method) return MixedLower("get_" + method->name() + "_method"); } +static inline string MethodPropertiesGetterHelperName(const MethodDescriptor* method) { + return MixedLower("get_" + method->name() + "_method_helper"); +} + static inline string MethodIdFieldName(const MethodDescriptor* method) { return "METHODID_" + ToAllUpperCase(method->name()); } @@ -319,6 +323,7 @@ static void PrintMethodFields( (*vars)["method_field_name"] = MethodPropertiesFieldName(method); (*vars)["method_new_field_name"] = MethodPropertiesGetterName(method); (*vars)["method_method_name"] = MethodPropertiesGetterName(method); + (*vars)["method_method_name_helper"] = MethodPropertiesGetterHelperName(method); bool client_streaming = method->client_streaming(); bool server_streaming = method->server_streaming(); if (client_streaming) { @@ -346,7 +351,7 @@ static void PrintMethodFields( "@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/1901\")\n" "@$Deprecated$ // Use {@link #$method_method_name$()} instead. \n" "public static final $MethodDescriptor$<$input_type$,\n" - " $output_type$> $method_field_name$ = $method_method_name$();\n" + " $output_type$> $method_field_name$ = $method_method_name_helper$();\n" "\n" "private static volatile $MethodDescriptor$<$input_type$,\n" " $output_type$> $method_new_field_name$;\n" @@ -354,6 +359,11 @@ static void PrintMethodFields( "@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/1901\")\n" "public static $MethodDescriptor$<$input_type$,\n" " $output_type$> $method_method_name$() {\n" + " return $method_method_name_helper$();\n" + "}\n" + "\n" + "private static $MethodDescriptor$<$input_type$,\n" + " $output_type$> $method_method_name_helper$() {\n" " $MethodDescriptor$<$input_type$, $output_type$> $method_new_field_name$;\n" " if (($method_new_field_name$ = $service_class_name$.$method_new_field_name$) == null) {\n" " synchronized ($service_class_name$.class) {\n" @@ -385,7 +395,7 @@ static void PrintMethodFields( "@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/1901\")\n" "@$Deprecated$ // Use {@link #$method_method_name$()} instead. \n" "public static final $MethodDescriptor$<$input_type$,\n" - " $output_type$> $method_field_name$ = $method_method_name$();\n" + " $output_type$> $method_field_name$ = $method_method_name_helper$();\n" "\n" "private static volatile $MethodDescriptor$<$input_type$,\n" " $output_type$> $method_new_field_name$;\n" @@ -393,6 +403,11 @@ static void PrintMethodFields( "@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/1901\")\n" "public static $MethodDescriptor$<$input_type$,\n" " $output_type$> $method_method_name$() {\n" + " return $method_method_name_helper$();\n" + "}\n" + "\n" + "private static $MethodDescriptor$<$input_type$,\n" + " $output_type$> $method_method_name_helper$() {\n" " $MethodDescriptor$<$input_type$, $output_type$> $method_new_field_name$;\n" " if (($method_new_field_name$ = $service_class_name$.$method_new_field_name$) == null) {\n" " synchronized ($service_class_name$.class) {\n" @@ -597,7 +612,7 @@ static void PrintStub( (*vars)["output_type"] = MessageFullJavaName(generate_nano, method->output_type()); (*vars)["lower_method_name"] = LowerMethodName(method); - (*vars)["method_method_name"] = MethodPropertiesGetterName(method); + (*vars)["method_method_name_helper"] = MethodPropertiesGetterHelperName(method); bool client_streaming = method->client_streaming(); bool server_streaming = method->server_streaming(); @@ -677,11 +692,11 @@ static void PrintStub( if (client_streaming) { p->Print( *vars, - "return asyncUnimplementedStreamingCall($method_method_name$(), responseObserver);\n"); + "return asyncUnimplementedStreamingCall($method_method_name_helper$(), responseObserver);\n"); } else { p->Print( *vars, - "asyncUnimplementedUnaryCall($method_method_name$(), responseObserver);\n"); + "asyncUnimplementedUnaryCall($method_method_name_helper$(), responseObserver);\n"); } break; default: @@ -702,7 +717,7 @@ static void PrintStub( p->Print( *vars, "return $calls_method$(\n" - " getChannel(), $method_method_name$(), getCallOptions(), $params$);\n"); + " getChannel(), $method_method_name_helper$(), getCallOptions(), $params$);\n"); break; case ASYNC_CALL: if (server_streaming) { @@ -726,7 +741,7 @@ static void PrintStub( p->Print( *vars, "$last_line_prefix$$calls_method$(\n" - " getChannel().newCall($method_method_name$(), getCallOptions()), $params$);\n"); + " getChannel().newCall($method_method_name_helper$(), getCallOptions()), $params$);\n"); break; case FUTURE_CALL: GRPC_CODEGEN_CHECK(!client_streaming && !server_streaming) @@ -737,7 +752,7 @@ static void PrintStub( p->Print( *vars, "return $calls_method$(\n" - " getChannel().newCall($method_method_name$(), getCallOptions()), request);\n"); + " getChannel().newCall($method_method_name_helper$(), getCallOptions()), request);\n"); break; } } @@ -961,8 +976,8 @@ static void PrintGetServiceDescriptorMethod(const ServiceDescriptor* service, } for (int i = 0; i < service->method_count(); ++i) { const MethodDescriptor* method = service->method(i); - (*vars)["method_method_name"] = MethodPropertiesGetterName(method); - p->Print(*vars, "\n.addMethod($method_method_name$())"); + (*vars)["method_method_name_helper"] = MethodPropertiesGetterHelperName(method); + p->Print(*vars, "\n.addMethod($method_method_name_helper$())"); } p->Print("\n.build();\n"); p->Outdent(); @@ -993,7 +1008,7 @@ static void PrintBindServiceMethodBody(const ServiceDescriptor* service, for (int i = 0; i < service->method_count(); ++i) { const MethodDescriptor* method = service->method(i); (*vars)["lower_method_name"] = LowerMethodName(method); - (*vars)["method_method_name"] = MethodPropertiesGetterName(method); + (*vars)["method_method_name_helper"] = MethodPropertiesGetterHelperName(method); (*vars)["input_type"] = MessageFullJavaName(generate_nano, method->input_type()); (*vars)["output_type"] = MessageFullJavaName(generate_nano, @@ -1018,7 +1033,7 @@ static void PrintBindServiceMethodBody(const ServiceDescriptor* service, p->Indent(); p->Print( *vars, - "$method_method_name$(),\n" + "$method_method_name_helper$(),\n" "$calls_method$(\n"); p->Indent(); p->Print( diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt index d9de41fa480..3e9bf8544b0 100644 --- a/compiler/src/test/golden/TestService.java.txt +++ b/compiler/src/test/golden/TestService.java.txt @@ -33,7 +33,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getUnaryCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_UNARY_CALL = getUnaryCallMethod(); + io.grpc.testing.integration.Test.SimpleResponse> METHOD_UNARY_CALL = getUnaryCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; @@ -41,6 +41,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getUnaryCallMethod() { + return getUnaryCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { io.grpc.MethodDescriptor getUnaryCallMethod; if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -65,7 +70,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingOutputCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethod(); + io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; @@ -73,6 +78,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { + return getStreamingOutputCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { io.grpc.MethodDescriptor getStreamingOutputCallMethod; if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -97,7 +107,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingInputCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethod(); + io.grpc.testing.integration.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; @@ -105,6 +115,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { + return getStreamingInputCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { io.grpc.MethodDescriptor getStreamingInputCallMethod; if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -129,7 +144,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getFullBidiCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_FULL_BIDI_CALL = getFullBidiCallMethod(); + io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL = getFullBidiCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getFullBidiCallMethod; @@ -137,6 +152,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getFullBidiCallMethod() { + return getFullBidiCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getFullBidiCallMethodHelper() { io.grpc.MethodDescriptor getFullBidiCallMethod; if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -161,7 +181,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getHalfBidiCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_HALF_BIDI_CALL = getHalfBidiCallMethod(); + io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL = getHalfBidiCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getHalfBidiCallMethod; @@ -169,6 +189,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getHalfBidiCallMethod() { + return getHalfBidiCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getHalfBidiCallMethodHelper() { io.grpc.MethodDescriptor getHalfBidiCallMethod; if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -229,7 +254,7 @@ public final class TestServiceGrpc { */ public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getUnaryCallMethodHelper(), responseObserver); } /** @@ -240,7 +265,7 @@ public final class TestServiceGrpc { */ public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getStreamingOutputCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getStreamingOutputCallMethodHelper(), responseObserver); } /** @@ -251,7 +276,7 @@ public final class TestServiceGrpc { */ public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getStreamingInputCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getStreamingInputCallMethodHelper(), responseObserver); } /** @@ -263,7 +288,7 @@ public final class TestServiceGrpc { */ public io.grpc.stub.StreamObserver fullBidiCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getFullBidiCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getFullBidiCallMethodHelper(), responseObserver); } /** @@ -276,41 +301,41 @@ public final class TestServiceGrpc { */ public io.grpc.stub.StreamObserver halfBidiCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getHalfBidiCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getHalfBidiCallMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getUnaryCallMethod(), + getUnaryCallMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.Test.SimpleRequest, io.grpc.testing.integration.Test.SimpleResponse>( this, METHODID_UNARY_CALL))) .addMethod( - getStreamingOutputCallMethod(), + getStreamingOutputCallMethodHelper(), asyncServerStreamingCall( new MethodHandlers< io.grpc.testing.integration.Test.StreamingOutputCallRequest, io.grpc.testing.integration.Test.StreamingOutputCallResponse>( this, METHODID_STREAMING_OUTPUT_CALL))) .addMethod( - getStreamingInputCallMethod(), + getStreamingInputCallMethodHelper(), asyncClientStreamingCall( new MethodHandlers< io.grpc.testing.integration.Test.StreamingInputCallRequest, io.grpc.testing.integration.Test.StreamingInputCallResponse>( this, METHODID_STREAMING_INPUT_CALL))) .addMethod( - getFullBidiCallMethod(), + getFullBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.Test.StreamingOutputCallRequest, io.grpc.testing.integration.Test.StreamingOutputCallResponse>( this, METHODID_FULL_BIDI_CALL))) .addMethod( - getHalfBidiCallMethod(), + getHalfBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.Test.StreamingOutputCallRequest, @@ -350,7 +375,7 @@ public final class TestServiceGrpc { public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -362,7 +387,7 @@ public final class TestServiceGrpc { public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( - getChannel().newCall(getStreamingOutputCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getStreamingOutputCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -374,7 +399,7 @@ public final class TestServiceGrpc { public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( - getChannel().newCall(getStreamingInputCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getStreamingInputCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -387,7 +412,7 @@ public final class TestServiceGrpc { public io.grpc.stub.StreamObserver fullBidiCall( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getFullBidiCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getFullBidiCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -401,7 +426,7 @@ public final class TestServiceGrpc { public io.grpc.stub.StreamObserver halfBidiCall( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getHalfBidiCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getHalfBidiCallMethodHelper(), getCallOptions()), responseObserver); } } @@ -434,7 +459,7 @@ public final class TestServiceGrpc { */ public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request) { return blockingUnaryCall( - getChannel(), getUnaryCallMethod(), getCallOptions(), request); + getChannel(), getUnaryCallMethodHelper(), getCallOptions(), request); } /** @@ -446,7 +471,7 @@ public final class TestServiceGrpc { public java.util.Iterator streamingOutputCall( io.grpc.testing.integration.Test.StreamingOutputCallRequest request) { return blockingServerStreamingCall( - getChannel(), getStreamingOutputCallMethod(), getCallOptions(), request); + getChannel(), getStreamingOutputCallMethodHelper(), getCallOptions(), request); } } @@ -480,7 +505,7 @@ public final class TestServiceGrpc { public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.testing.integration.Test.SimpleRequest request) { return futureUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request); } } @@ -585,11 +610,11 @@ public final class TestServiceGrpc { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new TestServiceFileDescriptorSupplier()) - .addMethod(getUnaryCallMethod()) - .addMethod(getStreamingOutputCallMethod()) - .addMethod(getStreamingInputCallMethod()) - .addMethod(getFullBidiCallMethod()) - .addMethod(getHalfBidiCallMethod()) + .addMethod(getUnaryCallMethodHelper()) + .addMethod(getStreamingOutputCallMethodHelper()) + .addMethod(getStreamingInputCallMethodHelper()) + .addMethod(getFullBidiCallMethodHelper()) + .addMethod(getHalfBidiCallMethodHelper()) .build(); } } diff --git a/compiler/src/testLite/golden/TestService.java.txt b/compiler/src/testLite/golden/TestService.java.txt index 6e0db0158c9..830b047f75b 100644 --- a/compiler/src/testLite/golden/TestService.java.txt +++ b/compiler/src/testLite/golden/TestService.java.txt @@ -33,7 +33,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getUnaryCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_UNARY_CALL = getUnaryCallMethod(); + io.grpc.testing.integration.Test.SimpleResponse> METHOD_UNARY_CALL = getUnaryCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; @@ -41,6 +41,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getUnaryCallMethod() { + return getUnaryCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { io.grpc.MethodDescriptor getUnaryCallMethod; if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -64,7 +69,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingOutputCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethod(); + io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; @@ -72,6 +77,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { + return getStreamingOutputCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { io.grpc.MethodDescriptor getStreamingOutputCallMethod; if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -95,7 +105,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingInputCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethod(); + io.grpc.testing.integration.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; @@ -103,6 +113,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { + return getStreamingInputCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { io.grpc.MethodDescriptor getStreamingInputCallMethod; if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -126,7 +141,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getFullBidiCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_FULL_BIDI_CALL = getFullBidiCallMethod(); + io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL = getFullBidiCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getFullBidiCallMethod; @@ -134,6 +149,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getFullBidiCallMethod() { + return getFullBidiCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getFullBidiCallMethodHelper() { io.grpc.MethodDescriptor getFullBidiCallMethod; if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -157,7 +177,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getHalfBidiCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_HALF_BIDI_CALL = getHalfBidiCallMethod(); + io.grpc.testing.integration.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL = getHalfBidiCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getHalfBidiCallMethod; @@ -165,6 +185,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getHalfBidiCallMethod() { + return getHalfBidiCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getHalfBidiCallMethodHelper() { io.grpc.MethodDescriptor getHalfBidiCallMethod; if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -224,7 +249,7 @@ public final class TestServiceGrpc { */ public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getUnaryCallMethodHelper(), responseObserver); } /** @@ -235,7 +260,7 @@ public final class TestServiceGrpc { */ public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getStreamingOutputCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getStreamingOutputCallMethodHelper(), responseObserver); } /** @@ -246,7 +271,7 @@ public final class TestServiceGrpc { */ public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getStreamingInputCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getStreamingInputCallMethodHelper(), responseObserver); } /** @@ -258,7 +283,7 @@ public final class TestServiceGrpc { */ public io.grpc.stub.StreamObserver fullBidiCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getFullBidiCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getFullBidiCallMethodHelper(), responseObserver); } /** @@ -271,41 +296,41 @@ public final class TestServiceGrpc { */ public io.grpc.stub.StreamObserver halfBidiCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getHalfBidiCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getHalfBidiCallMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getUnaryCallMethod(), + getUnaryCallMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.Test.SimpleRequest, io.grpc.testing.integration.Test.SimpleResponse>( this, METHODID_UNARY_CALL))) .addMethod( - getStreamingOutputCallMethod(), + getStreamingOutputCallMethodHelper(), asyncServerStreamingCall( new MethodHandlers< io.grpc.testing.integration.Test.StreamingOutputCallRequest, io.grpc.testing.integration.Test.StreamingOutputCallResponse>( this, METHODID_STREAMING_OUTPUT_CALL))) .addMethod( - getStreamingInputCallMethod(), + getStreamingInputCallMethodHelper(), asyncClientStreamingCall( new MethodHandlers< io.grpc.testing.integration.Test.StreamingInputCallRequest, io.grpc.testing.integration.Test.StreamingInputCallResponse>( this, METHODID_STREAMING_INPUT_CALL))) .addMethod( - getFullBidiCallMethod(), + getFullBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.Test.StreamingOutputCallRequest, io.grpc.testing.integration.Test.StreamingOutputCallResponse>( this, METHODID_FULL_BIDI_CALL))) .addMethod( - getHalfBidiCallMethod(), + getHalfBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.Test.StreamingOutputCallRequest, @@ -345,7 +370,7 @@ public final class TestServiceGrpc { public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -357,7 +382,7 @@ public final class TestServiceGrpc { public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( - getChannel().newCall(getStreamingOutputCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getStreamingOutputCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -369,7 +394,7 @@ public final class TestServiceGrpc { public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( - getChannel().newCall(getStreamingInputCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getStreamingInputCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -382,7 +407,7 @@ public final class TestServiceGrpc { public io.grpc.stub.StreamObserver fullBidiCall( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getFullBidiCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getFullBidiCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -396,7 +421,7 @@ public final class TestServiceGrpc { public io.grpc.stub.StreamObserver halfBidiCall( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getHalfBidiCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getHalfBidiCallMethodHelper(), getCallOptions()), responseObserver); } } @@ -429,7 +454,7 @@ public final class TestServiceGrpc { */ public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request) { return blockingUnaryCall( - getChannel(), getUnaryCallMethod(), getCallOptions(), request); + getChannel(), getUnaryCallMethodHelper(), getCallOptions(), request); } /** @@ -441,7 +466,7 @@ public final class TestServiceGrpc { public java.util.Iterator streamingOutputCall( io.grpc.testing.integration.Test.StreamingOutputCallRequest request) { return blockingServerStreamingCall( - getChannel(), getStreamingOutputCallMethod(), getCallOptions(), request); + getChannel(), getStreamingOutputCallMethodHelper(), getCallOptions(), request); } } @@ -475,7 +500,7 @@ public final class TestServiceGrpc { public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.testing.integration.Test.SimpleRequest request) { return futureUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request); } } @@ -544,11 +569,11 @@ public final class TestServiceGrpc { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .addMethod(getUnaryCallMethod()) - .addMethod(getStreamingOutputCallMethod()) - .addMethod(getStreamingInputCallMethod()) - .addMethod(getFullBidiCallMethod()) - .addMethod(getHalfBidiCallMethod()) + .addMethod(getUnaryCallMethodHelper()) + .addMethod(getStreamingOutputCallMethodHelper()) + .addMethod(getStreamingInputCallMethodHelper()) + .addMethod(getFullBidiCallMethodHelper()) + .addMethod(getHalfBidiCallMethodHelper()) .build(); } } diff --git a/compiler/src/testNano/golden/TestService.java.txt b/compiler/src/testNano/golden/TestService.java.txt index 5d5ddaefbb8..d81e061b2d6 100644 --- a/compiler/src/testNano/golden/TestService.java.txt +++ b/compiler/src/testNano/golden/TestService.java.txt @@ -37,7 +37,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getUnaryCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_UNARY_CALL = getUnaryCallMethod(); + io.grpc.testing.integration.nano.Test.SimpleResponse> METHOD_UNARY_CALL = getUnaryCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; @@ -45,6 +45,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getUnaryCallMethod() { + return getUnaryCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { io.grpc.MethodDescriptor getUnaryCallMethod; if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -70,7 +75,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingOutputCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethod(); + io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; @@ -78,6 +83,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { + return getStreamingOutputCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { io.grpc.MethodDescriptor getStreamingOutputCallMethod; if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -103,7 +113,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingInputCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethod(); + io.grpc.testing.integration.nano.Test.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; @@ -111,6 +121,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { + return getStreamingInputCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { io.grpc.MethodDescriptor getStreamingInputCallMethod; if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -136,7 +151,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getFullBidiCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_FULL_BIDI_CALL = getFullBidiCallMethod(); + io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_FULL_BIDI_CALL = getFullBidiCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getFullBidiCallMethod; @@ -144,6 +159,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getFullBidiCallMethod() { + return getFullBidiCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getFullBidiCallMethodHelper() { io.grpc.MethodDescriptor getFullBidiCallMethod; if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -169,7 +189,7 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getHalfBidiCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_HALF_BIDI_CALL = getHalfBidiCallMethod(); + io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse> METHOD_HALF_BIDI_CALL = getHalfBidiCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getHalfBidiCallMethod; @@ -177,6 +197,11 @@ public final class TestServiceGrpc { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getHalfBidiCallMethod() { + return getHalfBidiCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getHalfBidiCallMethodHelper() { io.grpc.MethodDescriptor getHalfBidiCallMethod; if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -287,7 +312,7 @@ public final class TestServiceGrpc { */ public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getUnaryCallMethodHelper(), responseObserver); } /** @@ -298,7 +323,7 @@ public final class TestServiceGrpc { */ public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getStreamingOutputCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getStreamingOutputCallMethodHelper(), responseObserver); } /** @@ -309,7 +334,7 @@ public final class TestServiceGrpc { */ public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getStreamingInputCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getStreamingInputCallMethodHelper(), responseObserver); } /** @@ -321,7 +346,7 @@ public final class TestServiceGrpc { */ public io.grpc.stub.StreamObserver fullBidiCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getFullBidiCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getFullBidiCallMethodHelper(), responseObserver); } /** @@ -334,41 +359,41 @@ public final class TestServiceGrpc { */ public io.grpc.stub.StreamObserver halfBidiCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getHalfBidiCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getHalfBidiCallMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getUnaryCallMethod(), + getUnaryCallMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.nano.Test.SimpleRequest, io.grpc.testing.integration.nano.Test.SimpleResponse>( this, METHODID_UNARY_CALL))) .addMethod( - getStreamingOutputCallMethod(), + getStreamingOutputCallMethodHelper(), asyncServerStreamingCall( new MethodHandlers< io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>( this, METHODID_STREAMING_OUTPUT_CALL))) .addMethod( - getStreamingInputCallMethod(), + getStreamingInputCallMethodHelper(), asyncClientStreamingCall( new MethodHandlers< io.grpc.testing.integration.nano.Test.StreamingInputCallRequest, io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>( this, METHODID_STREAMING_INPUT_CALL))) .addMethod( - getFullBidiCallMethod(), + getFullBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>( this, METHODID_FULL_BIDI_CALL))) .addMethod( - getHalfBidiCallMethod(), + getHalfBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, @@ -408,7 +433,7 @@ public final class TestServiceGrpc { public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -420,7 +445,7 @@ public final class TestServiceGrpc { public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( - getChannel().newCall(getStreamingOutputCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getStreamingOutputCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -432,7 +457,7 @@ public final class TestServiceGrpc { public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( - getChannel().newCall(getStreamingInputCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getStreamingInputCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -445,7 +470,7 @@ public final class TestServiceGrpc { public io.grpc.stub.StreamObserver fullBidiCall( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getFullBidiCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getFullBidiCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -459,7 +484,7 @@ public final class TestServiceGrpc { public io.grpc.stub.StreamObserver halfBidiCall( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getHalfBidiCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getHalfBidiCallMethodHelper(), getCallOptions()), responseObserver); } } @@ -492,7 +517,7 @@ public final class TestServiceGrpc { */ public io.grpc.testing.integration.nano.Test.SimpleResponse unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request) { return blockingUnaryCall( - getChannel(), getUnaryCallMethod(), getCallOptions(), request); + getChannel(), getUnaryCallMethodHelper(), getCallOptions(), request); } /** @@ -504,7 +529,7 @@ public final class TestServiceGrpc { public java.util.Iterator streamingOutputCall( io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request) { return blockingServerStreamingCall( - getChannel(), getStreamingOutputCallMethod(), getCallOptions(), request); + getChannel(), getStreamingOutputCallMethodHelper(), getCallOptions(), request); } } @@ -538,7 +563,7 @@ public final class TestServiceGrpc { public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.testing.integration.nano.Test.SimpleRequest request) { return futureUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request); } } @@ -607,11 +632,11 @@ public final class TestServiceGrpc { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .addMethod(getUnaryCallMethod()) - .addMethod(getStreamingOutputCallMethod()) - .addMethod(getStreamingInputCallMethod()) - .addMethod(getFullBidiCallMethod()) - .addMethod(getHalfBidiCallMethod()) + .addMethod(getUnaryCallMethodHelper()) + .addMethod(getStreamingOutputCallMethodHelper()) + .addMethod(getStreamingInputCallMethodHelper()) + .addMethod(getFullBidiCallMethodHelper()) + .addMethod(getHalfBidiCallMethodHelper()) .build(); } } diff --git a/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java b/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java index b6d4c707831..73f95eb005c 100644 --- a/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java +++ b/grpclb/src/generated/main/grpc/io/grpc/grpclb/LoadBalancerGrpc.java @@ -30,7 +30,7 @@ private LoadBalancerGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getBalanceLoadMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_BALANCE_LOAD = getBalanceLoadMethod(); + io.grpc.grpclb.LoadBalanceResponse> METHOD_BALANCE_LOAD = getBalanceLoadMethodHelper(); private static volatile io.grpc.MethodDescriptor getBalanceLoadMethod; @@ -38,6 +38,11 @@ private LoadBalancerGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getBalanceLoadMethod() { + return getBalanceLoadMethodHelper(); + } + + private static io.grpc.MethodDescriptor getBalanceLoadMethodHelper() { io.grpc.MethodDescriptor getBalanceLoadMethod; if ((getBalanceLoadMethod = LoadBalancerGrpc.getBalanceLoadMethod) == null) { synchronized (LoadBalancerGrpc.class) { @@ -94,13 +99,13 @@ public static abstract class LoadBalancerImplBase implements io.grpc.BindableSer */ public io.grpc.stub.StreamObserver balanceLoad( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getBalanceLoadMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getBalanceLoadMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getBalanceLoadMethod(), + getBalanceLoadMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.grpclb.LoadBalanceRequest, @@ -136,7 +141,7 @@ protected LoadBalancerStub build(io.grpc.Channel channel, public io.grpc.stub.StreamObserver balanceLoad( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getBalanceLoadMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getBalanceLoadMethodHelper(), getCallOptions()), responseObserver); } } @@ -261,7 +266,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new LoadBalancerFileDescriptorSupplier()) - .addMethod(getBalanceLoadMethod()) + .addMethod(getBalanceLoadMethodHelper()) .build(); } } diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java index c9e8ef195dc..4318a912c31 100644 --- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java +++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java @@ -30,7 +30,7 @@ private MetricsServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getGetAllGaugesMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_GET_ALL_GAUGES = getGetAllGaugesMethod(); + io.grpc.testing.integration.Metrics.GaugeResponse> METHOD_GET_ALL_GAUGES = getGetAllGaugesMethodHelper(); private static volatile io.grpc.MethodDescriptor getGetAllGaugesMethod; @@ -38,6 +38,11 @@ private MetricsServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getGetAllGaugesMethod() { + return getGetAllGaugesMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetAllGaugesMethodHelper() { io.grpc.MethodDescriptor getGetAllGaugesMethod; if ((getGetAllGaugesMethod = MetricsServiceGrpc.getGetAllGaugesMethod) == null) { synchronized (MetricsServiceGrpc.class) { @@ -62,7 +67,7 @@ io.grpc.testing.integration.Metrics.GaugeResponse> getGetAllGaugesMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getGetGaugeMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_GET_GAUGE = getGetGaugeMethod(); + io.grpc.testing.integration.Metrics.GaugeResponse> METHOD_GET_GAUGE = getGetGaugeMethodHelper(); private static volatile io.grpc.MethodDescriptor getGetGaugeMethod; @@ -70,6 +75,11 @@ io.grpc.testing.integration.Metrics.GaugeResponse> getGetAllGaugesMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getGetGaugeMethod() { + return getGetGaugeMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetGaugeMethodHelper() { io.grpc.MethodDescriptor getGetGaugeMethod; if ((getGetGaugeMethod = MetricsServiceGrpc.getGetGaugeMethod) == null) { synchronized (MetricsServiceGrpc.class) { @@ -127,7 +137,7 @@ public static abstract class MetricsServiceImplBase implements io.grpc.BindableS */ public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetAllGaugesMethod(), responseObserver); + asyncUnimplementedUnaryCall(getGetAllGaugesMethodHelper(), responseObserver); } /** @@ -137,20 +147,20 @@ public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage reques */ public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetGaugeMethod(), responseObserver); + asyncUnimplementedUnaryCall(getGetGaugeMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getGetAllGaugesMethod(), + getGetAllGaugesMethodHelper(), asyncServerStreamingCall( new MethodHandlers< io.grpc.testing.integration.Metrics.EmptyMessage, io.grpc.testing.integration.Metrics.GaugeResponse>( this, METHODID_GET_ALL_GAUGES))) .addMethod( - getGetGaugeMethod(), + getGetGaugeMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.Metrics.GaugeRequest, @@ -187,7 +197,7 @@ protected MetricsServiceStub build(io.grpc.Channel channel, public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( - getChannel().newCall(getGetAllGaugesMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getGetAllGaugesMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -198,7 +208,7 @@ public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage reques public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetGaugeMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getGetGaugeMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -229,7 +239,7 @@ protected MetricsServiceBlockingStub build(io.grpc.Channel channel, public java.util.Iterator getAllGauges( io.grpc.testing.integration.Metrics.EmptyMessage request) { return blockingServerStreamingCall( - getChannel(), getGetAllGaugesMethod(), getCallOptions(), request); + getChannel(), getGetAllGaugesMethodHelper(), getCallOptions(), request); } /** @@ -239,7 +249,7 @@ public java.util.Iterator get */ public io.grpc.testing.integration.Metrics.GaugeResponse getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request) { return blockingUnaryCall( - getChannel(), getGetGaugeMethod(), getCallOptions(), request); + getChannel(), getGetGaugeMethodHelper(), getCallOptions(), request); } } @@ -269,7 +279,7 @@ protected MetricsServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture getGauge( io.grpc.testing.integration.Metrics.GaugeRequest request) { return futureUnaryCall( - getChannel().newCall(getGetGaugeMethod(), getCallOptions()), request); + getChannel().newCall(getGetGaugeMethodHelper(), getCallOptions()), request); } } @@ -362,8 +372,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new MetricsServiceFileDescriptorSupplier()) - .addMethod(getGetAllGaugesMethod()) - .addMethod(getGetGaugeMethod()) + .addMethod(getGetAllGaugesMethodHelper()) + .addMethod(getGetGaugeMethodHelper()) .build(); } } diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java index 1d1157631a1..448ce12b41a 100644 --- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java +++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java @@ -33,7 +33,7 @@ private ReconnectServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStartMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_START = getStartMethod(); + com.google.protobuf.EmptyProtos.Empty> METHOD_START = getStartMethodHelper(); private static volatile io.grpc.MethodDescriptor getStartMethod; @@ -41,6 +41,11 @@ private ReconnectServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStartMethod() { + return getStartMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStartMethodHelper() { io.grpc.MethodDescriptor getStartMethod; if ((getStartMethod = ReconnectServiceGrpc.getStartMethod) == null) { synchronized (ReconnectServiceGrpc.class) { @@ -65,7 +70,7 @@ com.google.protobuf.EmptyProtos.Empty> getStartMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStopMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STOP = getStopMethod(); + io.grpc.testing.integration.Messages.ReconnectInfo> METHOD_STOP = getStopMethodHelper(); private static volatile io.grpc.MethodDescriptor getStopMethod; @@ -73,6 +78,11 @@ com.google.protobuf.EmptyProtos.Empty> getStartMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStopMethod() { + return getStopMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStopMethodHelper() { io.grpc.MethodDescriptor getStopMethod; if ((getStopMethod = ReconnectServiceGrpc.getStopMethod) == null) { synchronized (ReconnectServiceGrpc.class) { @@ -129,27 +139,27 @@ public static abstract class ReconnectServiceImplBase implements io.grpc.Bindabl */ public void start(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getStartMethod(), responseObserver); + asyncUnimplementedUnaryCall(getStartMethodHelper(), responseObserver); } /** */ public void stop(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getStopMethod(), responseObserver); + asyncUnimplementedUnaryCall(getStopMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getStartMethod(), + getStartMethodHelper(), asyncUnaryCall( new MethodHandlers< com.google.protobuf.EmptyProtos.Empty, com.google.protobuf.EmptyProtos.Empty>( this, METHODID_START))) .addMethod( - getStopMethod(), + getStopMethodHelper(), asyncUnaryCall( new MethodHandlers< com.google.protobuf.EmptyProtos.Empty, @@ -185,7 +195,7 @@ protected ReconnectServiceStub build(io.grpc.Channel channel, public void start(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getStartMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getStartMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -193,7 +203,7 @@ public void start(com.google.protobuf.EmptyProtos.Empty request, public void stop(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getStopMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getStopMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -222,14 +232,14 @@ protected ReconnectServiceBlockingStub build(io.grpc.Channel channel, */ public com.google.protobuf.EmptyProtos.Empty start(com.google.protobuf.EmptyProtos.Empty request) { return blockingUnaryCall( - getChannel(), getStartMethod(), getCallOptions(), request); + getChannel(), getStartMethodHelper(), getCallOptions(), request); } /** */ public io.grpc.testing.integration.Messages.ReconnectInfo stop(com.google.protobuf.EmptyProtos.Empty request) { return blockingUnaryCall( - getChannel(), getStopMethod(), getCallOptions(), request); + getChannel(), getStopMethodHelper(), getCallOptions(), request); } } @@ -259,7 +269,7 @@ protected ReconnectServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture start( com.google.protobuf.EmptyProtos.Empty request) { return futureUnaryCall( - getChannel().newCall(getStartMethod(), getCallOptions()), request); + getChannel().newCall(getStartMethodHelper(), getCallOptions()), request); } /** @@ -267,7 +277,7 @@ public com.google.common.util.concurrent.ListenableFuture stop( com.google.protobuf.EmptyProtos.Empty request) { return futureUnaryCall( - getChannel().newCall(getStopMethod(), getCallOptions()), request); + getChannel().newCall(getStopMethodHelper(), getCallOptions()), request); } } @@ -360,8 +370,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ReconnectServiceFileDescriptorSupplier()) - .addMethod(getStartMethod()) - .addMethod(getStopMethod()) + .addMethod(getStartMethodHelper()) + .addMethod(getStopMethodHelper()) .build(); } } diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java index 5578f190411..f23b2f1fe4b 100644 --- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java +++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java @@ -34,7 +34,7 @@ private TestServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getEmptyCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_EMPTY_CALL = getEmptyCallMethod(); + com.google.protobuf.EmptyProtos.Empty> METHOD_EMPTY_CALL = getEmptyCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getEmptyCallMethod; @@ -42,6 +42,11 @@ private TestServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getEmptyCallMethod() { + return getEmptyCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getEmptyCallMethodHelper() { io.grpc.MethodDescriptor getEmptyCallMethod; if ((getEmptyCallMethod = TestServiceGrpc.getEmptyCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -66,7 +71,7 @@ com.google.protobuf.EmptyProtos.Empty> getEmptyCallMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getUnaryCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_UNARY_CALL = getUnaryCallMethod(); + io.grpc.testing.integration.Messages.SimpleResponse> METHOD_UNARY_CALL = getUnaryCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; @@ -74,6 +79,11 @@ com.google.protobuf.EmptyProtos.Empty> getEmptyCallMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getUnaryCallMethod() { + return getUnaryCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { io.grpc.MethodDescriptor getUnaryCallMethod; if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -98,7 +108,7 @@ io.grpc.testing.integration.Messages.SimpleResponse> getUnaryCallMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getCacheableUnaryCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_CACHEABLE_UNARY_CALL = getCacheableUnaryCallMethod(); + io.grpc.testing.integration.Messages.SimpleResponse> METHOD_CACHEABLE_UNARY_CALL = getCacheableUnaryCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getCacheableUnaryCallMethod; @@ -106,6 +116,11 @@ io.grpc.testing.integration.Messages.SimpleResponse> getUnaryCallMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getCacheableUnaryCallMethod() { + return getCacheableUnaryCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getCacheableUnaryCallMethodHelper() { io.grpc.MethodDescriptor getCacheableUnaryCallMethod; if ((getCacheableUnaryCallMethod = TestServiceGrpc.getCacheableUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -130,7 +145,7 @@ io.grpc.testing.integration.Messages.SimpleResponse> getCacheableUnaryCallMethod @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingOutputCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethod(); + io.grpc.testing.integration.Messages.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; @@ -138,6 +153,11 @@ io.grpc.testing.integration.Messages.SimpleResponse> getCacheableUnaryCallMethod @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { + return getStreamingOutputCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { io.grpc.MethodDescriptor getStreamingOutputCallMethod; if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -162,7 +182,7 @@ io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getStreamingOu @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getStreamingInputCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethod(); + io.grpc.testing.integration.Messages.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; @@ -170,6 +190,11 @@ io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getStreamingOu @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { + return getStreamingInputCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { io.grpc.MethodDescriptor getStreamingInputCallMethod; if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -194,7 +219,7 @@ io.grpc.testing.integration.Messages.StreamingInputCallResponse> getStreamingInp @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getFullDuplexCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_FULL_DUPLEX_CALL = getFullDuplexCallMethod(); + io.grpc.testing.integration.Messages.StreamingOutputCallResponse> METHOD_FULL_DUPLEX_CALL = getFullDuplexCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getFullDuplexCallMethod; @@ -202,6 +227,11 @@ io.grpc.testing.integration.Messages.StreamingInputCallResponse> getStreamingInp @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getFullDuplexCallMethod() { + return getFullDuplexCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getFullDuplexCallMethodHelper() { io.grpc.MethodDescriptor getFullDuplexCallMethod; if ((getFullDuplexCallMethod = TestServiceGrpc.getFullDuplexCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -226,7 +256,7 @@ io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getFullDuplexC @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getHalfDuplexCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_HALF_DUPLEX_CALL = getHalfDuplexCallMethod(); + io.grpc.testing.integration.Messages.StreamingOutputCallResponse> METHOD_HALF_DUPLEX_CALL = getHalfDuplexCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getHalfDuplexCallMethod; @@ -234,6 +264,11 @@ io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getFullDuplexC @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getHalfDuplexCallMethod() { + return getHalfDuplexCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getHalfDuplexCallMethodHelper() { io.grpc.MethodDescriptor getHalfDuplexCallMethod; if ((getHalfDuplexCallMethod = TestServiceGrpc.getHalfDuplexCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -258,7 +293,7 @@ io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getHalfDuplexC @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getUnimplementedCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_UNIMPLEMENTED_CALL = getUnimplementedCallMethod(); + com.google.protobuf.EmptyProtos.Empty> METHOD_UNIMPLEMENTED_CALL = getUnimplementedCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getUnimplementedCallMethod; @@ -266,6 +301,11 @@ io.grpc.testing.integration.Messages.StreamingOutputCallResponse> getHalfDuplexC @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getUnimplementedCallMethod() { + return getUnimplementedCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getUnimplementedCallMethodHelper() { io.grpc.MethodDescriptor getUnimplementedCallMethod; if ((getUnimplementedCallMethod = TestServiceGrpc.getUnimplementedCallMethod) == null) { synchronized (TestServiceGrpc.class) { @@ -326,7 +366,7 @@ public static abstract class TestServiceImplBase implements io.grpc.BindableServ */ public void emptyCall(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getEmptyCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getEmptyCallMethodHelper(), responseObserver); } /** @@ -336,7 +376,7 @@ public void emptyCall(com.google.protobuf.EmptyProtos.Empty request, */ public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getUnaryCallMethodHelper(), responseObserver); } /** @@ -348,7 +388,7 @@ public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request */ public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCacheableUnaryCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getCacheableUnaryCallMethodHelper(), responseObserver); } /** @@ -359,7 +399,7 @@ public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleReques */ public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getStreamingOutputCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getStreamingOutputCallMethodHelper(), responseObserver); } /** @@ -370,7 +410,7 @@ public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOu */ public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getStreamingInputCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getStreamingInputCallMethodHelper(), responseObserver); } /** @@ -382,7 +422,7 @@ public io.grpc.stub.StreamObserver fullDuplexCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getFullDuplexCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getFullDuplexCallMethodHelper(), responseObserver); } /** @@ -395,7 +435,7 @@ public io.grpc.stub.StreamObserver halfDuplexCall( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getHalfDuplexCallMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getHalfDuplexCallMethodHelper(), responseObserver); } /** @@ -406,62 +446,62 @@ public io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUnimplementedCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getUnimplementedCallMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getEmptyCallMethod(), + getEmptyCallMethodHelper(), asyncUnaryCall( new MethodHandlers< com.google.protobuf.EmptyProtos.Empty, com.google.protobuf.EmptyProtos.Empty>( this, METHODID_EMPTY_CALL))) .addMethod( - getUnaryCallMethod(), + getUnaryCallMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse>( this, METHODID_UNARY_CALL))) .addMethod( - getCacheableUnaryCallMethod(), + getCacheableUnaryCallMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse>( this, METHODID_CACHEABLE_UNARY_CALL))) .addMethod( - getStreamingOutputCallMethod(), + getStreamingOutputCallMethodHelper(), asyncServerStreamingCall( new MethodHandlers< io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>( this, METHODID_STREAMING_OUTPUT_CALL))) .addMethod( - getStreamingInputCallMethod(), + getStreamingInputCallMethodHelper(), asyncClientStreamingCall( new MethodHandlers< io.grpc.testing.integration.Messages.StreamingInputCallRequest, io.grpc.testing.integration.Messages.StreamingInputCallResponse>( this, METHODID_STREAMING_INPUT_CALL))) .addMethod( - getFullDuplexCallMethod(), + getFullDuplexCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>( this, METHODID_FULL_DUPLEX_CALL))) .addMethod( - getHalfDuplexCallMethod(), + getHalfDuplexCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>( this, METHODID_HALF_DUPLEX_CALL))) .addMethod( - getUnimplementedCallMethod(), + getUnimplementedCallMethodHelper(), asyncUnaryCall( new MethodHandlers< com.google.protobuf.EmptyProtos.Empty, @@ -501,7 +541,7 @@ protected TestServiceStub build(io.grpc.Channel channel, public void emptyCall(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getEmptyCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getEmptyCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -512,7 +552,7 @@ public void emptyCall(com.google.protobuf.EmptyProtos.Empty request, public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -525,7 +565,7 @@ public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCacheableUnaryCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getCacheableUnaryCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -537,7 +577,7 @@ public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleReques public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( - getChannel().newCall(getStreamingOutputCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getStreamingOutputCallMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -549,7 +589,7 @@ public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOu public io.grpc.stub.StreamObserver streamingInputCall( io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( - getChannel().newCall(getStreamingInputCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getStreamingInputCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -562,7 +602,7 @@ public io.grpc.stub.StreamObserver fullDuplexCall( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getFullDuplexCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getFullDuplexCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -576,7 +616,7 @@ public io.grpc.stub.StreamObserver halfDuplexCall( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getHalfDuplexCallMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getHalfDuplexCallMethodHelper(), getCallOptions()), responseObserver); } /** @@ -588,7 +628,7 @@ public io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUnimplementedCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUnimplementedCallMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -621,7 +661,7 @@ protected TestServiceBlockingStub build(io.grpc.Channel channel, */ public com.google.protobuf.EmptyProtos.Empty emptyCall(com.google.protobuf.EmptyProtos.Empty request) { return blockingUnaryCall( - getChannel(), getEmptyCallMethod(), getCallOptions(), request); + getChannel(), getEmptyCallMethodHelper(), getCallOptions(), request); } /** @@ -631,7 +671,7 @@ public com.google.protobuf.EmptyProtos.Empty emptyCall(com.google.protobuf.Empty */ public io.grpc.testing.integration.Messages.SimpleResponse unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request) { return blockingUnaryCall( - getChannel(), getUnaryCallMethod(), getCallOptions(), request); + getChannel(), getUnaryCallMethodHelper(), getCallOptions(), request); } /** @@ -643,7 +683,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse unaryCall(io.grpc.tes */ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request) { return blockingUnaryCall( - getChannel(), getCacheableUnaryCallMethod(), getCallOptions(), request); + getChannel(), getCacheableUnaryCallMethodHelper(), getCallOptions(), request); } /** @@ -655,7 +695,7 @@ public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io public java.util.Iterator streamingOutputCall( io.grpc.testing.integration.Messages.StreamingOutputCallRequest request) { return blockingServerStreamingCall( - getChannel(), getStreamingOutputCallMethod(), getCallOptions(), request); + getChannel(), getStreamingOutputCallMethodHelper(), getCallOptions(), request); } /** @@ -666,7 +706,7 @@ public java.util.Iterator emptyCall( com.google.protobuf.EmptyProtos.Empty request) { return futureUnaryCall( - getChannel().newCall(getEmptyCallMethod(), getCallOptions()), request); + getChannel().newCall(getEmptyCallMethodHelper(), getCallOptions()), request); } /** @@ -711,7 +751,7 @@ public com.google.common.util.concurrent.ListenableFuture unaryCall( io.grpc.testing.integration.Messages.SimpleRequest request) { return futureUnaryCall( - getChannel().newCall(getUnaryCallMethod(), getCallOptions()), request); + getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request); } /** @@ -724,7 +764,7 @@ public com.google.common.util.concurrent.ListenableFuture cacheableUnaryCall( io.grpc.testing.integration.Messages.SimpleRequest request) { return futureUnaryCall( - getChannel().newCall(getCacheableUnaryCallMethod(), getCallOptions()), request); + getChannel().newCall(getCacheableUnaryCallMethodHelper(), getCallOptions()), request); } /** @@ -736,7 +776,7 @@ public com.google.common.util.concurrent.ListenableFuture unimplementedCall( com.google.protobuf.EmptyProtos.Empty request) { return futureUnaryCall( - getChannel().newCall(getUnimplementedCallMethod(), getCallOptions()), request); + getChannel().newCall(getUnimplementedCallMethodHelper(), getCallOptions()), request); } } @@ -856,14 +896,14 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new TestServiceFileDescriptorSupplier()) - .addMethod(getEmptyCallMethod()) - .addMethod(getUnaryCallMethod()) - .addMethod(getCacheableUnaryCallMethod()) - .addMethod(getStreamingOutputCallMethod()) - .addMethod(getStreamingInputCallMethod()) - .addMethod(getFullDuplexCallMethod()) - .addMethod(getHalfDuplexCallMethod()) - .addMethod(getUnimplementedCallMethod()) + .addMethod(getEmptyCallMethodHelper()) + .addMethod(getUnaryCallMethodHelper()) + .addMethod(getCacheableUnaryCallMethodHelper()) + .addMethod(getStreamingOutputCallMethodHelper()) + .addMethod(getStreamingInputCallMethodHelper()) + .addMethod(getFullDuplexCallMethodHelper()) + .addMethod(getHalfDuplexCallMethodHelper()) + .addMethod(getUnimplementedCallMethodHelper()) .build(); } } diff --git a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java index 8bf42f1a18c..90b734d94d1 100644 --- a/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java +++ b/interop-testing/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java @@ -34,7 +34,7 @@ private UnimplementedServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getUnimplementedCallMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_UNIMPLEMENTED_CALL = getUnimplementedCallMethod(); + com.google.protobuf.EmptyProtos.Empty> METHOD_UNIMPLEMENTED_CALL = getUnimplementedCallMethodHelper(); private static volatile io.grpc.MethodDescriptor getUnimplementedCallMethod; @@ -42,6 +42,11 @@ private UnimplementedServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getUnimplementedCallMethod() { + return getUnimplementedCallMethodHelper(); + } + + private static io.grpc.MethodDescriptor getUnimplementedCallMethodHelper() { io.grpc.MethodDescriptor getUnimplementedCallMethod; if ((getUnimplementedCallMethod = UnimplementedServiceGrpc.getUnimplementedCallMethod) == null) { synchronized (UnimplementedServiceGrpc.class) { @@ -102,13 +107,13 @@ public static abstract class UnimplementedServiceImplBase implements io.grpc.Bin */ public void unimplementedCall(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUnimplementedCallMethod(), responseObserver); + asyncUnimplementedUnaryCall(getUnimplementedCallMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getUnimplementedCallMethod(), + getUnimplementedCallMethodHelper(), asyncUnaryCall( new MethodHandlers< com.google.protobuf.EmptyProtos.Empty, @@ -148,7 +153,7 @@ protected UnimplementedServiceStub build(io.grpc.Channel channel, public void unimplementedCall(com.google.protobuf.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUnimplementedCallMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUnimplementedCallMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -181,7 +186,7 @@ protected UnimplementedServiceBlockingStub build(io.grpc.Channel channel, */ public com.google.protobuf.EmptyProtos.Empty unimplementedCall(com.google.protobuf.EmptyProtos.Empty request) { return blockingUnaryCall( - getChannel(), getUnimplementedCallMethod(), getCallOptions(), request); + getChannel(), getUnimplementedCallMethodHelper(), getCallOptions(), request); } } @@ -215,7 +220,7 @@ protected UnimplementedServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture unimplementedCall( com.google.protobuf.EmptyProtos.Empty request) { return futureUnaryCall( - getChannel().newCall(getUnimplementedCallMethod(), getCallOptions()), request); + getChannel().newCall(getUnimplementedCallMethodHelper(), getCallOptions()), request); } } @@ -303,7 +308,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new UnimplementedServiceFileDescriptorSupplier()) - .addMethod(getUnimplementedCallMethod()) + .addMethod(getUnimplementedCallMethodHelper()) .build(); } } diff --git a/services/src/generated/main/grpc/io/grpc/health/v1/HealthGrpc.java b/services/src/generated/main/grpc/io/grpc/health/v1/HealthGrpc.java index e3f4f49a880..d2a62cd550a 100644 --- a/services/src/generated/main/grpc/io/grpc/health/v1/HealthGrpc.java +++ b/services/src/generated/main/grpc/io/grpc/health/v1/HealthGrpc.java @@ -30,7 +30,7 @@ private HealthGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getCheckMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_CHECK = getCheckMethod(); + io.grpc.health.v1.HealthCheckResponse> METHOD_CHECK = getCheckMethodHelper(); private static volatile io.grpc.MethodDescriptor getCheckMethod; @@ -38,6 +38,11 @@ private HealthGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getCheckMethod() { + return getCheckMethodHelper(); + } + + private static io.grpc.MethodDescriptor getCheckMethodHelper() { io.grpc.MethodDescriptor getCheckMethod; if ((getCheckMethod = HealthGrpc.getCheckMethod) == null) { synchronized (HealthGrpc.class) { @@ -91,13 +96,13 @@ public static abstract class HealthImplBase implements io.grpc.BindableService { */ public void check(io.grpc.health.v1.HealthCheckRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCheckMethod(), responseObserver); + asyncUnimplementedUnaryCall(getCheckMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getCheckMethod(), + getCheckMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.health.v1.HealthCheckRequest, @@ -130,7 +135,7 @@ protected HealthStub build(io.grpc.Channel channel, public void check(io.grpc.health.v1.HealthCheckRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getCheckMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getCheckMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -156,7 +161,7 @@ protected HealthBlockingStub build(io.grpc.Channel channel, */ public io.grpc.health.v1.HealthCheckResponse check(io.grpc.health.v1.HealthCheckRequest request) { return blockingUnaryCall( - getChannel(), getCheckMethod(), getCallOptions(), request); + getChannel(), getCheckMethodHelper(), getCallOptions(), request); } } @@ -183,7 +188,7 @@ protected HealthFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture check( io.grpc.health.v1.HealthCheckRequest request) { return futureUnaryCall( - getChannel().newCall(getCheckMethod(), getCallOptions()), request); + getChannel().newCall(getCheckMethodHelper(), getCallOptions()), request); } } @@ -271,7 +276,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new HealthFileDescriptorSupplier()) - .addMethod(getCheckMethod()) + .addMethod(getCheckMethodHelper()) .build(); } } diff --git a/services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java b/services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java index 6da75b3e1cc..bfc57850688 100644 --- a/services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java +++ b/services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java @@ -30,7 +30,7 @@ private MonitoringGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getGetCanonicalRpcStatsMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_GET_CANONICAL_RPC_STATS = getGetCanonicalRpcStatsMethod(); + io.grpc.instrumentation.v1alpha.CanonicalRpcStats> METHOD_GET_CANONICAL_RPC_STATS = getGetCanonicalRpcStatsMethodHelper(); private static volatile io.grpc.MethodDescriptor getGetCanonicalRpcStatsMethod; @@ -38,6 +38,11 @@ private MonitoringGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getGetCanonicalRpcStatsMethod() { + return getGetCanonicalRpcStatsMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetCanonicalRpcStatsMethodHelper() { io.grpc.MethodDescriptor getGetCanonicalRpcStatsMethod; if ((getGetCanonicalRpcStatsMethod = MonitoringGrpc.getGetCanonicalRpcStatsMethod) == null) { synchronized (MonitoringGrpc.class) { @@ -62,7 +67,7 @@ io.grpc.instrumentation.v1alpha.CanonicalRpcStats> getGetCanonicalRpcStatsMethod @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getGetStatsMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_GET_STATS = getGetStatsMethod(); + io.grpc.instrumentation.v1alpha.StatsResponse> METHOD_GET_STATS = getGetStatsMethodHelper(); private static volatile io.grpc.MethodDescriptor getGetStatsMethod; @@ -70,6 +75,11 @@ io.grpc.instrumentation.v1alpha.CanonicalRpcStats> getGetCanonicalRpcStatsMethod @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getGetStatsMethod() { + return getGetStatsMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetStatsMethodHelper() { io.grpc.MethodDescriptor getGetStatsMethod; if ((getGetStatsMethod = MonitoringGrpc.getGetStatsMethod) == null) { synchronized (MonitoringGrpc.class) { @@ -94,7 +104,7 @@ io.grpc.instrumentation.v1alpha.StatsResponse> getGetStatsMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getWatchStatsMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_WATCH_STATS = getWatchStatsMethod(); + io.grpc.instrumentation.v1alpha.StatsResponse> METHOD_WATCH_STATS = getWatchStatsMethodHelper(); private static volatile io.grpc.MethodDescriptor getWatchStatsMethod; @@ -102,6 +112,11 @@ io.grpc.instrumentation.v1alpha.StatsResponse> getGetStatsMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getWatchStatsMethod() { + return getWatchStatsMethodHelper(); + } + + private static io.grpc.MethodDescriptor getWatchStatsMethodHelper() { io.grpc.MethodDescriptor getWatchStatsMethod; if ((getWatchStatsMethod = MonitoringGrpc.getWatchStatsMethod) == null) { synchronized (MonitoringGrpc.class) { @@ -126,7 +141,7 @@ io.grpc.instrumentation.v1alpha.StatsResponse> getWatchStatsMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getGetRequestTracesMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_GET_REQUEST_TRACES = getGetRequestTracesMethod(); + io.grpc.instrumentation.v1alpha.TraceResponse> METHOD_GET_REQUEST_TRACES = getGetRequestTracesMethodHelper(); private static volatile io.grpc.MethodDescriptor getGetRequestTracesMethod; @@ -134,6 +149,11 @@ io.grpc.instrumentation.v1alpha.StatsResponse> getWatchStatsMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getGetRequestTracesMethod() { + return getGetRequestTracesMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetRequestTracesMethodHelper() { io.grpc.MethodDescriptor getGetRequestTracesMethod; if ((getGetRequestTracesMethod = MonitoringGrpc.getGetRequestTracesMethod) == null) { synchronized (MonitoringGrpc.class) { @@ -158,7 +178,7 @@ io.grpc.instrumentation.v1alpha.TraceResponse> getGetRequestTracesMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getGetCustomMonitoringDataMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_GET_CUSTOM_MONITORING_DATA = getGetCustomMonitoringDataMethod(); + io.grpc.instrumentation.v1alpha.CustomMonitoringData> METHOD_GET_CUSTOM_MONITORING_DATA = getGetCustomMonitoringDataMethodHelper(); private static volatile io.grpc.MethodDescriptor getGetCustomMonitoringDataMethod; @@ -166,6 +186,11 @@ io.grpc.instrumentation.v1alpha.TraceResponse> getGetRequestTracesMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getGetCustomMonitoringDataMethod() { + return getGetCustomMonitoringDataMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetCustomMonitoringDataMethodHelper() { io.grpc.MethodDescriptor getGetCustomMonitoringDataMethod; if ((getGetCustomMonitoringDataMethod = MonitoringGrpc.getGetCustomMonitoringDataMethod) == null) { synchronized (MonitoringGrpc.class) { @@ -222,7 +247,7 @@ public static abstract class MonitoringImplBase implements io.grpc.BindableServi */ public void getCanonicalRpcStats(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetCanonicalRpcStatsMethod(), responseObserver); + asyncUnimplementedUnaryCall(getGetCanonicalRpcStatsMethodHelper(), responseObserver); } /** @@ -232,7 +257,7 @@ public void getCanonicalRpcStats(com.google.protobuf.Empty request, */ public void getStats(io.grpc.instrumentation.v1alpha.StatsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetStatsMethod(), responseObserver); + asyncUnimplementedUnaryCall(getGetStatsMethodHelper(), responseObserver); } /** @@ -242,7 +267,7 @@ public void getStats(io.grpc.instrumentation.v1alpha.StatsRequest request, */ public void watchStats(io.grpc.instrumentation.v1alpha.StatsRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getWatchStatsMethod(), responseObserver); + asyncUnimplementedUnaryCall(getWatchStatsMethodHelper(), responseObserver); } /** @@ -252,7 +277,7 @@ public void watchStats(io.grpc.instrumentation.v1alpha.StatsRequest request, */ public void getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetRequestTracesMethod(), responseObserver); + asyncUnimplementedUnaryCall(getGetRequestTracesMethodHelper(), responseObserver); } /** @@ -265,41 +290,41 @@ public void getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest reques */ public void getCustomMonitoringData(io.grpc.instrumentation.v1alpha.MonitoringDataGroup request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetCustomMonitoringDataMethod(), responseObserver); + asyncUnimplementedUnaryCall(getGetCustomMonitoringDataMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getGetCanonicalRpcStatsMethod(), + getGetCanonicalRpcStatsMethodHelper(), asyncUnaryCall( new MethodHandlers< com.google.protobuf.Empty, io.grpc.instrumentation.v1alpha.CanonicalRpcStats>( this, METHODID_GET_CANONICAL_RPC_STATS))) .addMethod( - getGetStatsMethod(), + getGetStatsMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.instrumentation.v1alpha.StatsRequest, io.grpc.instrumentation.v1alpha.StatsResponse>( this, METHODID_GET_STATS))) .addMethod( - getWatchStatsMethod(), + getWatchStatsMethodHelper(), asyncServerStreamingCall( new MethodHandlers< io.grpc.instrumentation.v1alpha.StatsRequest, io.grpc.instrumentation.v1alpha.StatsResponse>( this, METHODID_WATCH_STATS))) .addMethod( - getGetRequestTracesMethod(), + getGetRequestTracesMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.instrumentation.v1alpha.TraceRequest, io.grpc.instrumentation.v1alpha.TraceResponse>( this, METHODID_GET_REQUEST_TRACES))) .addMethod( - getGetCustomMonitoringDataMethod(), + getGetCustomMonitoringDataMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.instrumentation.v1alpha.MonitoringDataGroup, @@ -335,7 +360,7 @@ protected MonitoringStub build(io.grpc.Channel channel, public void getCanonicalRpcStats(com.google.protobuf.Empty request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetCanonicalRpcStatsMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getGetCanonicalRpcStatsMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -346,7 +371,7 @@ public void getCanonicalRpcStats(com.google.protobuf.Empty request, public void getStats(io.grpc.instrumentation.v1alpha.StatsRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetStatsMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getGetStatsMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -357,7 +382,7 @@ public void getStats(io.grpc.instrumentation.v1alpha.StatsRequest request, public void watchStats(io.grpc.instrumentation.v1alpha.StatsRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( - getChannel().newCall(getWatchStatsMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getWatchStatsMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -368,7 +393,7 @@ public void watchStats(io.grpc.instrumentation.v1alpha.StatsRequest request, public void getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetRequestTracesMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getGetRequestTracesMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -382,7 +407,7 @@ public void getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest reques public void getCustomMonitoringData(io.grpc.instrumentation.v1alpha.MonitoringDataGroup request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getGetCustomMonitoringDataMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getGetCustomMonitoringDataMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -411,7 +436,7 @@ protected MonitoringBlockingStub build(io.grpc.Channel channel, */ public io.grpc.instrumentation.v1alpha.CanonicalRpcStats getCanonicalRpcStats(com.google.protobuf.Empty request) { return blockingUnaryCall( - getChannel(), getGetCanonicalRpcStatsMethod(), getCallOptions(), request); + getChannel(), getGetCanonicalRpcStatsMethodHelper(), getCallOptions(), request); } /** @@ -421,7 +446,7 @@ public io.grpc.instrumentation.v1alpha.CanonicalRpcStats getCanonicalRpcStats(co */ public io.grpc.instrumentation.v1alpha.StatsResponse getStats(io.grpc.instrumentation.v1alpha.StatsRequest request) { return blockingUnaryCall( - getChannel(), getGetStatsMethod(), getCallOptions(), request); + getChannel(), getGetStatsMethodHelper(), getCallOptions(), request); } /** @@ -432,7 +457,7 @@ public io.grpc.instrumentation.v1alpha.StatsResponse getStats(io.grpc.instrument public java.util.Iterator watchStats( io.grpc.instrumentation.v1alpha.StatsRequest request) { return blockingServerStreamingCall( - getChannel(), getWatchStatsMethod(), getCallOptions(), request); + getChannel(), getWatchStatsMethodHelper(), getCallOptions(), request); } /** @@ -442,7 +467,7 @@ public java.util.Iterator watchSt */ public io.grpc.instrumentation.v1alpha.TraceResponse getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest request) { return blockingUnaryCall( - getChannel(), getGetRequestTracesMethod(), getCallOptions(), request); + getChannel(), getGetRequestTracesMethodHelper(), getCallOptions(), request); } /** @@ -455,7 +480,7 @@ public io.grpc.instrumentation.v1alpha.TraceResponse getRequestTraces(io.grpc.in */ public io.grpc.instrumentation.v1alpha.CustomMonitoringData getCustomMonitoringData(io.grpc.instrumentation.v1alpha.MonitoringDataGroup request) { return blockingUnaryCall( - getChannel(), getGetCustomMonitoringDataMethod(), getCallOptions(), request); + getChannel(), getGetCustomMonitoringDataMethodHelper(), getCallOptions(), request); } } @@ -485,7 +510,7 @@ protected MonitoringFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture getCanonicalRpcStats( com.google.protobuf.Empty request) { return futureUnaryCall( - getChannel().newCall(getGetCanonicalRpcStatsMethod(), getCallOptions()), request); + getChannel().newCall(getGetCanonicalRpcStatsMethodHelper(), getCallOptions()), request); } /** @@ -496,7 +521,7 @@ public com.google.common.util.concurrent.ListenableFuture getStats( io.grpc.instrumentation.v1alpha.StatsRequest request) { return futureUnaryCall( - getChannel().newCall(getGetStatsMethod(), getCallOptions()), request); + getChannel().newCall(getGetStatsMethodHelper(), getCallOptions()), request); } /** @@ -507,7 +532,7 @@ public com.google.common.util.concurrent.ListenableFuture getRequestTraces( io.grpc.instrumentation.v1alpha.TraceRequest request) { return futureUnaryCall( - getChannel().newCall(getGetRequestTracesMethod(), getCallOptions()), request); + getChannel().newCall(getGetRequestTracesMethodHelper(), getCallOptions()), request); } /** @@ -521,7 +546,7 @@ public com.google.common.util.concurrent.ListenableFuture getCustomMonitoringData( io.grpc.instrumentation.v1alpha.MonitoringDataGroup request) { return futureUnaryCall( - getChannel().newCall(getGetCustomMonitoringDataMethod(), getCallOptions()), request); + getChannel().newCall(getGetCustomMonitoringDataMethodHelper(), getCallOptions()), request); } } @@ -629,11 +654,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new MonitoringFileDescriptorSupplier()) - .addMethod(getGetCanonicalRpcStatsMethod()) - .addMethod(getGetStatsMethod()) - .addMethod(getWatchStatsMethod()) - .addMethod(getGetRequestTracesMethod()) - .addMethod(getGetCustomMonitoringDataMethod()) + .addMethod(getGetCanonicalRpcStatsMethodHelper()) + .addMethod(getGetStatsMethodHelper()) + .addMethod(getWatchStatsMethodHelper()) + .addMethod(getGetRequestTracesMethodHelper()) + .addMethod(getGetCustomMonitoringDataMethodHelper()) .build(); } } diff --git a/services/src/generated/main/grpc/io/grpc/reflection/v1alpha/ServerReflectionGrpc.java b/services/src/generated/main/grpc/io/grpc/reflection/v1alpha/ServerReflectionGrpc.java index fd03585c595..21bb625ad40 100644 --- a/services/src/generated/main/grpc/io/grpc/reflection/v1alpha/ServerReflectionGrpc.java +++ b/services/src/generated/main/grpc/io/grpc/reflection/v1alpha/ServerReflectionGrpc.java @@ -30,7 +30,7 @@ private ServerReflectionGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getServerReflectionInfoMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_SERVER_REFLECTION_INFO = getServerReflectionInfoMethod(); + io.grpc.reflection.v1alpha.ServerReflectionResponse> METHOD_SERVER_REFLECTION_INFO = getServerReflectionInfoMethodHelper(); private static volatile io.grpc.MethodDescriptor getServerReflectionInfoMethod; @@ -38,6 +38,11 @@ private ServerReflectionGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getServerReflectionInfoMethod() { + return getServerReflectionInfoMethodHelper(); + } + + private static io.grpc.MethodDescriptor getServerReflectionInfoMethodHelper() { io.grpc.MethodDescriptor getServerReflectionInfoMethod; if ((getServerReflectionInfoMethod = ServerReflectionGrpc.getServerReflectionInfoMethod) == null) { synchronized (ServerReflectionGrpc.class) { @@ -95,13 +100,13 @@ public static abstract class ServerReflectionImplBase implements io.grpc.Bindabl */ public io.grpc.stub.StreamObserver serverReflectionInfo( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getServerReflectionInfoMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getServerReflectionInfoMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getServerReflectionInfoMethod(), + getServerReflectionInfoMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.reflection.v1alpha.ServerReflectionRequest, @@ -138,7 +143,7 @@ protected ServerReflectionStub build(io.grpc.Channel channel, public io.grpc.stub.StreamObserver serverReflectionInfo( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getServerReflectionInfoMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getServerReflectionInfoMethodHelper(), getCallOptions()), responseObserver); } } @@ -263,7 +268,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ServerReflectionFileDescriptorSupplier()) - .addMethod(getServerReflectionInfoMethod()) + .addMethod(getServerReflectionInfoMethodHelper()) .build(); } } diff --git a/services/src/generated/test/grpc/io/grpc/reflection/testing/AnotherDynamicServiceGrpc.java b/services/src/generated/test/grpc/io/grpc/reflection/testing/AnotherDynamicServiceGrpc.java index efbbd249ea4..fcb29e5bba2 100644 --- a/services/src/generated/test/grpc/io/grpc/reflection/testing/AnotherDynamicServiceGrpc.java +++ b/services/src/generated/test/grpc/io/grpc/reflection/testing/AnotherDynamicServiceGrpc.java @@ -33,7 +33,7 @@ private AnotherDynamicServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getMethodMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_METHOD = getMethodMethod(); + io.grpc.reflection.testing.DynamicReply> METHOD_METHOD = getMethodMethodHelper(); private static volatile io.grpc.MethodDescriptor getMethodMethod; @@ -41,6 +41,11 @@ private AnotherDynamicServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getMethodMethod() { + return getMethodMethodHelper(); + } + + private static io.grpc.MethodDescriptor getMethodMethodHelper() { io.grpc.MethodDescriptor getMethodMethod; if ((getMethodMethod = AnotherDynamicServiceGrpc.getMethodMethod) == null) { synchronized (AnotherDynamicServiceGrpc.class) { @@ -100,13 +105,13 @@ public static abstract class AnotherDynamicServiceImplBase implements io.grpc.Bi */ public void method(io.grpc.reflection.testing.DynamicRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getMethodMethod(), responseObserver); + asyncUnimplementedUnaryCall(getMethodMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getMethodMethod(), + getMethodMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.reflection.testing.DynamicRequest, @@ -145,7 +150,7 @@ protected AnotherDynamicServiceStub build(io.grpc.Channel channel, public void method(io.grpc.reflection.testing.DynamicRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getMethodMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getMethodMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -177,7 +182,7 @@ protected AnotherDynamicServiceBlockingStub build(io.grpc.Channel channel, */ public io.grpc.reflection.testing.DynamicReply method(io.grpc.reflection.testing.DynamicRequest request) { return blockingUnaryCall( - getChannel(), getMethodMethod(), getCallOptions(), request); + getChannel(), getMethodMethodHelper(), getCallOptions(), request); } } @@ -210,7 +215,7 @@ protected AnotherDynamicServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture method( io.grpc.reflection.testing.DynamicRequest request) { return futureUnaryCall( - getChannel().newCall(getMethodMethod(), getCallOptions()), request); + getChannel().newCall(getMethodMethodHelper(), getCallOptions()), request); } } @@ -298,7 +303,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AnotherDynamicServiceFileDescriptorSupplier()) - .addMethod(getMethodMethod()) + .addMethod(getMethodMethodHelper()) .build(); } } diff --git a/services/src/generated/test/grpc/io/grpc/reflection/testing/DynamicServiceGrpc.java b/services/src/generated/test/grpc/io/grpc/reflection/testing/DynamicServiceGrpc.java index d63ac4af258..b45abf60750 100644 --- a/services/src/generated/test/grpc/io/grpc/reflection/testing/DynamicServiceGrpc.java +++ b/services/src/generated/test/grpc/io/grpc/reflection/testing/DynamicServiceGrpc.java @@ -33,7 +33,7 @@ private DynamicServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getMethodMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_METHOD = getMethodMethod(); + io.grpc.reflection.testing.DynamicReply> METHOD_METHOD = getMethodMethodHelper(); private static volatile io.grpc.MethodDescriptor getMethodMethod; @@ -41,6 +41,11 @@ private DynamicServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getMethodMethod() { + return getMethodMethodHelper(); + } + + private static io.grpc.MethodDescriptor getMethodMethodHelper() { io.grpc.MethodDescriptor getMethodMethod; if ((getMethodMethod = DynamicServiceGrpc.getMethodMethod) == null) { synchronized (DynamicServiceGrpc.class) { @@ -100,13 +105,13 @@ public static abstract class DynamicServiceImplBase implements io.grpc.BindableS */ public void method(io.grpc.reflection.testing.DynamicRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getMethodMethod(), responseObserver); + asyncUnimplementedUnaryCall(getMethodMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getMethodMethod(), + getMethodMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.reflection.testing.DynamicRequest, @@ -145,7 +150,7 @@ protected DynamicServiceStub build(io.grpc.Channel channel, public void method(io.grpc.reflection.testing.DynamicRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getMethodMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getMethodMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -177,7 +182,7 @@ protected DynamicServiceBlockingStub build(io.grpc.Channel channel, */ public io.grpc.reflection.testing.DynamicReply method(io.grpc.reflection.testing.DynamicRequest request) { return blockingUnaryCall( - getChannel(), getMethodMethod(), getCallOptions(), request); + getChannel(), getMethodMethodHelper(), getCallOptions(), request); } } @@ -210,7 +215,7 @@ protected DynamicServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture method( io.grpc.reflection.testing.DynamicRequest request) { return futureUnaryCall( - getChannel().newCall(getMethodMethod(), getCallOptions()), request); + getChannel().newCall(getMethodMethodHelper(), getCallOptions()), request); } } @@ -298,7 +303,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new DynamicServiceFileDescriptorSupplier()) - .addMethod(getMethodMethod()) + .addMethod(getMethodMethodHelper()) .build(); } } diff --git a/services/src/generated/test/grpc/io/grpc/reflection/testing/ReflectableServiceGrpc.java b/services/src/generated/test/grpc/io/grpc/reflection/testing/ReflectableServiceGrpc.java index 3650aa69728..505164b448b 100644 --- a/services/src/generated/test/grpc/io/grpc/reflection/testing/ReflectableServiceGrpc.java +++ b/services/src/generated/test/grpc/io/grpc/reflection/testing/ReflectableServiceGrpc.java @@ -30,7 +30,7 @@ private ReflectableServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getMethodMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_METHOD = getMethodMethod(); + io.grpc.reflection.testing.Reply> METHOD_METHOD = getMethodMethodHelper(); private static volatile io.grpc.MethodDescriptor getMethodMethod; @@ -38,6 +38,11 @@ private ReflectableServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getMethodMethod() { + return getMethodMethodHelper(); + } + + private static io.grpc.MethodDescriptor getMethodMethodHelper() { io.grpc.MethodDescriptor getMethodMethod; if ((getMethodMethod = ReflectableServiceGrpc.getMethodMethod) == null) { synchronized (ReflectableServiceGrpc.class) { @@ -91,13 +96,13 @@ public static abstract class ReflectableServiceImplBase implements io.grpc.Binda */ public void method(io.grpc.reflection.testing.Request request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getMethodMethod(), responseObserver); + asyncUnimplementedUnaryCall(getMethodMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getMethodMethod(), + getMethodMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.reflection.testing.Request, @@ -130,7 +135,7 @@ protected ReflectableServiceStub build(io.grpc.Channel channel, public void method(io.grpc.reflection.testing.Request request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getMethodMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getMethodMethodHelper(), getCallOptions()), request, responseObserver); } } @@ -156,7 +161,7 @@ protected ReflectableServiceBlockingStub build(io.grpc.Channel channel, */ public io.grpc.reflection.testing.Reply method(io.grpc.reflection.testing.Request request) { return blockingUnaryCall( - getChannel(), getMethodMethod(), getCallOptions(), request); + getChannel(), getMethodMethodHelper(), getCallOptions(), request); } } @@ -183,7 +188,7 @@ protected ReflectableServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture method( io.grpc.reflection.testing.Request request) { return futureUnaryCall( - getChannel().newCall(getMethodMethod(), getCallOptions()), request); + getChannel().newCall(getMethodMethodHelper(), getCallOptions()), request); } } @@ -271,7 +276,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ReflectableServiceFileDescriptorSupplier()) - .addMethod(getMethodMethod()) + .addMethod(getMethodMethodHelper()) .build(); } } diff --git a/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java b/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java index 1bd2fe89cab..96abc3d2183 100644 --- a/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java +++ b/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java @@ -33,7 +33,7 @@ private SimpleServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getUnaryRpcMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_UNARY_RPC = getUnaryRpcMethod(); + io.grpc.testing.protobuf.SimpleResponse> METHOD_UNARY_RPC = getUnaryRpcMethodHelper(); private static volatile io.grpc.MethodDescriptor getUnaryRpcMethod; @@ -41,6 +41,11 @@ private SimpleServiceGrpc() {} @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getUnaryRpcMethod() { + return getUnaryRpcMethodHelper(); + } + + private static io.grpc.MethodDescriptor getUnaryRpcMethodHelper() { io.grpc.MethodDescriptor getUnaryRpcMethod; if ((getUnaryRpcMethod = SimpleServiceGrpc.getUnaryRpcMethod) == null) { synchronized (SimpleServiceGrpc.class) { @@ -65,7 +70,7 @@ io.grpc.testing.protobuf.SimpleResponse> getUnaryRpcMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getClientStreamingRpcMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_CLIENT_STREAMING_RPC = getClientStreamingRpcMethod(); + io.grpc.testing.protobuf.SimpleResponse> METHOD_CLIENT_STREAMING_RPC = getClientStreamingRpcMethodHelper(); private static volatile io.grpc.MethodDescriptor getClientStreamingRpcMethod; @@ -73,6 +78,11 @@ io.grpc.testing.protobuf.SimpleResponse> getUnaryRpcMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getClientStreamingRpcMethod() { + return getClientStreamingRpcMethodHelper(); + } + + private static io.grpc.MethodDescriptor getClientStreamingRpcMethodHelper() { io.grpc.MethodDescriptor getClientStreamingRpcMethod; if ((getClientStreamingRpcMethod = SimpleServiceGrpc.getClientStreamingRpcMethod) == null) { synchronized (SimpleServiceGrpc.class) { @@ -97,7 +107,7 @@ io.grpc.testing.protobuf.SimpleResponse> getClientStreamingRpcMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getServerStreamingRpcMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_SERVER_STREAMING_RPC = getServerStreamingRpcMethod(); + io.grpc.testing.protobuf.SimpleResponse> METHOD_SERVER_STREAMING_RPC = getServerStreamingRpcMethodHelper(); private static volatile io.grpc.MethodDescriptor getServerStreamingRpcMethod; @@ -105,6 +115,11 @@ io.grpc.testing.protobuf.SimpleResponse> getClientStreamingRpcMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getServerStreamingRpcMethod() { + return getServerStreamingRpcMethodHelper(); + } + + private static io.grpc.MethodDescriptor getServerStreamingRpcMethodHelper() { io.grpc.MethodDescriptor getServerStreamingRpcMethod; if ((getServerStreamingRpcMethod = SimpleServiceGrpc.getServerStreamingRpcMethod) == null) { synchronized (SimpleServiceGrpc.class) { @@ -129,7 +144,7 @@ io.grpc.testing.protobuf.SimpleResponse> getServerStreamingRpcMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getBidiStreamingRpcMethod()} instead. public static final io.grpc.MethodDescriptor METHOD_BIDI_STREAMING_RPC = getBidiStreamingRpcMethod(); + io.grpc.testing.protobuf.SimpleResponse> METHOD_BIDI_STREAMING_RPC = getBidiStreamingRpcMethodHelper(); private static volatile io.grpc.MethodDescriptor getBidiStreamingRpcMethod; @@ -137,6 +152,11 @@ io.grpc.testing.protobuf.SimpleResponse> getServerStreamingRpcMethod() { @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") public static io.grpc.MethodDescriptor getBidiStreamingRpcMethod() { + return getBidiStreamingRpcMethodHelper(); + } + + private static io.grpc.MethodDescriptor getBidiStreamingRpcMethodHelper() { io.grpc.MethodDescriptor getBidiStreamingRpcMethod; if ((getBidiStreamingRpcMethod = SimpleServiceGrpc.getBidiStreamingRpcMethod) == null) { synchronized (SimpleServiceGrpc.class) { @@ -196,7 +216,7 @@ public static abstract class SimpleServiceImplBase implements io.grpc.BindableSe */ public void unaryRpc(io.grpc.testing.protobuf.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUnaryRpcMethod(), responseObserver); + asyncUnimplementedUnaryCall(getUnaryRpcMethodHelper(), responseObserver); } /** @@ -206,7 +226,7 @@ public void unaryRpc(io.grpc.testing.protobuf.SimpleRequest request, */ public io.grpc.stub.StreamObserver clientStreamingRpc( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getClientStreamingRpcMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getClientStreamingRpcMethodHelper(), responseObserver); } /** @@ -216,7 +236,7 @@ public io.grpc.stub.StreamObserver clien */ public void serverStreamingRpc(io.grpc.testing.protobuf.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getServerStreamingRpcMethod(), responseObserver); + asyncUnimplementedUnaryCall(getServerStreamingRpcMethodHelper(), responseObserver); } /** @@ -226,34 +246,34 @@ public void serverStreamingRpc(io.grpc.testing.protobuf.SimpleRequest request, */ public io.grpc.stub.StreamObserver bidiStreamingRpc( io.grpc.stub.StreamObserver responseObserver) { - return asyncUnimplementedStreamingCall(getBidiStreamingRpcMethod(), responseObserver); + return asyncUnimplementedStreamingCall(getBidiStreamingRpcMethodHelper(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getUnaryRpcMethod(), + getUnaryRpcMethodHelper(), asyncUnaryCall( new MethodHandlers< io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>( this, METHODID_UNARY_RPC))) .addMethod( - getClientStreamingRpcMethod(), + getClientStreamingRpcMethodHelper(), asyncClientStreamingCall( new MethodHandlers< io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>( this, METHODID_CLIENT_STREAMING_RPC))) .addMethod( - getServerStreamingRpcMethod(), + getServerStreamingRpcMethodHelper(), asyncServerStreamingCall( new MethodHandlers< io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>( this, METHODID_SERVER_STREAMING_RPC))) .addMethod( - getBidiStreamingRpcMethod(), + getBidiStreamingRpcMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< io.grpc.testing.protobuf.SimpleRequest, @@ -292,7 +312,7 @@ protected SimpleServiceStub build(io.grpc.Channel channel, public void unaryRpc(io.grpc.testing.protobuf.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( - getChannel().newCall(getUnaryRpcMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getUnaryRpcMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -303,7 +323,7 @@ public void unaryRpc(io.grpc.testing.protobuf.SimpleRequest request, public io.grpc.stub.StreamObserver clientStreamingRpc( io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( - getChannel().newCall(getClientStreamingRpcMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getClientStreamingRpcMethodHelper(), getCallOptions()), responseObserver); } /** @@ -314,7 +334,7 @@ public io.grpc.stub.StreamObserver clien public void serverStreamingRpc(io.grpc.testing.protobuf.SimpleRequest request, io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( - getChannel().newCall(getServerStreamingRpcMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getServerStreamingRpcMethodHelper(), getCallOptions()), request, responseObserver); } /** @@ -325,7 +345,7 @@ public void serverStreamingRpc(io.grpc.testing.protobuf.SimpleRequest request, public io.grpc.stub.StreamObserver bidiStreamingRpc( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( - getChannel().newCall(getBidiStreamingRpcMethod(), getCallOptions()), responseObserver); + getChannel().newCall(getBidiStreamingRpcMethodHelper(), getCallOptions()), responseObserver); } } @@ -357,7 +377,7 @@ protected SimpleServiceBlockingStub build(io.grpc.Channel channel, */ public io.grpc.testing.protobuf.SimpleResponse unaryRpc(io.grpc.testing.protobuf.SimpleRequest request) { return blockingUnaryCall( - getChannel(), getUnaryRpcMethod(), getCallOptions(), request); + getChannel(), getUnaryRpcMethodHelper(), getCallOptions(), request); } /** @@ -368,7 +388,7 @@ public io.grpc.testing.protobuf.SimpleResponse unaryRpc(io.grpc.testing.protobuf public java.util.Iterator serverStreamingRpc( io.grpc.testing.protobuf.SimpleRequest request) { return blockingServerStreamingCall( - getChannel(), getServerStreamingRpcMethod(), getCallOptions(), request); + getChannel(), getServerStreamingRpcMethodHelper(), getCallOptions(), request); } } @@ -401,7 +421,7 @@ protected SimpleServiceFutureStub build(io.grpc.Channel channel, public com.google.common.util.concurrent.ListenableFuture unaryRpc( io.grpc.testing.protobuf.SimpleRequest request) { return futureUnaryCall( - getChannel().newCall(getUnaryRpcMethod(), getCallOptions()), request); + getChannel().newCall(getUnaryRpcMethodHelper(), getCallOptions()), request); } } @@ -502,10 +522,10 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new SimpleServiceFileDescriptorSupplier()) - .addMethod(getUnaryRpcMethod()) - .addMethod(getClientStreamingRpcMethod()) - .addMethod(getServerStreamingRpcMethod()) - .addMethod(getBidiStreamingRpcMethod()) + .addMethod(getUnaryRpcMethodHelper()) + .addMethod(getClientStreamingRpcMethodHelper()) + .addMethod(getServerStreamingRpcMethodHelper()) + .addMethod(getBidiStreamingRpcMethodHelper()) .build(); } }