From 8be87de9b02e42439ffb58af7f140b5bdb378017 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 1 May 2018 10:13:18 -0700 Subject: [PATCH] compiler: make testing service used by compiler not conflict with interop-testing proto This change puts the compiler test.proto file in a directory that matches it's path. The current proto package has a namespace collision with the grpc.testing proto in interop-testing. Thus, this PR: * change the package of test.proto to be grpc.testing.compiler * moves the test.proto into the matching grpc/testing/compiler/test.proto path * updates the generated code. --- compiler/build.gradle | 2 +- compiler/src/test/golden/TestService.java.txt | 262 +++++++-------- .../{ => grpc/testing/compiler}/test.proto | 19 +- .../src/testLite/golden/TestService.java.txt | 260 +++++++-------- .../src/testNano/golden/TestService.java.txt | 308 +++++++++--------- 5 files changed, 433 insertions(+), 418 deletions(-) rename compiler/src/test/proto/{ => grpc/testing/compiler}/test.proto (73%) diff --git a/compiler/build.gradle b/compiler/build.gradle index 53a7352784..ab3d6f6e1a 100644 --- a/compiler/build.gradle +++ b/compiler/build.gradle @@ -326,7 +326,7 @@ def configureTestTask(Task task, String dep, String extraPackage) { } // File isn't found on Windows if last slash is forward-slash def slash = System.getProperty("file.separator") - task.args "$buildDir/generated/source/proto/test${dep}/grpc/io/grpc/testing/integration${extraPackage}${slash}TestServiceGrpc.java", + task.args "$buildDir/generated/source/proto/test${dep}/grpc/io/grpc/testing/compiler${extraPackage}${slash}TestServiceGrpc.java", "$projectDir/src/test${dep}/golden/TestService.java.txt" } diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt index b0d7bd1945..8f850cf6ba 100644 --- a/compiler/src/test/golden/TestService.java.txt +++ b/compiler/src/test/golden/TestService.java.txt @@ -1,4 +1,4 @@ -package io.grpc.testing.integration; +package io.grpc.testing.compiler; import static io.grpc.MethodDescriptor.generateFullMethodName; import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; @@ -22,44 +22,44 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.13.0-SNAPSHOT)", - comments = "Source: test.proto") + comments = "Source: grpc/testing/compiler/test.proto") public final class TestServiceGrpc { private TestServiceGrpc() {} - public static final String SERVICE_NAME = "grpc.testing.TestService"; + public static final String SERVICE_NAME = "grpc.testing.compiler.TestService"; // Static method descriptors that strictly reflect the proto. @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 = getUnaryCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_UNARY_CALL = getUnaryCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; + private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getUnaryCallMethod() { + public static io.grpc.MethodDescriptor getUnaryCallMethod() { return getUnaryCallMethodHelper(); } - private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { - io.grpc.MethodDescriptor getUnaryCallMethod; + private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { + io.grpc.MethodDescriptor getUnaryCallMethod; if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { TestServiceGrpc.getUnaryCallMethod = getUnaryCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "UnaryCall")) + "grpc.testing.compiler.TestService", "UnaryCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.SimpleRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.SimpleRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.SimpleResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.SimpleResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("UnaryCall")) .build(); } @@ -69,34 +69,34 @@ 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 = getStreamingOutputCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; + private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { + public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { return getStreamingOutputCallMethodHelper(); } - private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { - io.grpc.MethodDescriptor getStreamingOutputCallMethod; + private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { + io.grpc.MethodDescriptor getStreamingOutputCallMethod; if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { TestServiceGrpc.getStreamingOutputCallMethod = getStreamingOutputCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "StreamingOutputCall")) + "grpc.testing.compiler.TestService", "StreamingOutputCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("StreamingOutputCall")) .build(); } @@ -106,34 +106,34 @@ 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 = getStreamingInputCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; + private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { + public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { return getStreamingInputCallMethodHelper(); } - private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { - io.grpc.MethodDescriptor getStreamingInputCallMethod; + private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { + io.grpc.MethodDescriptor getStreamingInputCallMethod; if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { TestServiceGrpc.getStreamingInputCallMethod = getStreamingInputCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "StreamingInputCall")) + "grpc.testing.compiler.TestService", "StreamingInputCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingInputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingInputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingInputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingInputCallResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("StreamingInputCall")) .build(); } @@ -143,34 +143,34 @@ 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 = getFullBidiCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_FULL_BIDI_CALL = getFullBidiCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getFullBidiCallMethod; + private static volatile io.grpc.MethodDescriptor getFullBidiCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getFullBidiCallMethod() { + public static io.grpc.MethodDescriptor getFullBidiCallMethod() { return getFullBidiCallMethodHelper(); } - private static io.grpc.MethodDescriptor getFullBidiCallMethodHelper() { - io.grpc.MethodDescriptor getFullBidiCallMethod; + private static io.grpc.MethodDescriptor getFullBidiCallMethodHelper() { + io.grpc.MethodDescriptor getFullBidiCallMethod; if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) { TestServiceGrpc.getFullBidiCallMethod = getFullBidiCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "FullBidiCall")) + "grpc.testing.compiler.TestService", "FullBidiCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("FullBidiCall")) .build(); } @@ -180,34 +180,34 @@ 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 = getHalfBidiCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_HALF_BIDI_CALL = getHalfBidiCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getHalfBidiCallMethod; + private static volatile io.grpc.MethodDescriptor getHalfBidiCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getHalfBidiCallMethod() { + public static io.grpc.MethodDescriptor getHalfBidiCallMethod() { return getHalfBidiCallMethodHelper(); } - private static io.grpc.MethodDescriptor getHalfBidiCallMethodHelper() { - io.grpc.MethodDescriptor getHalfBidiCallMethod; + private static io.grpc.MethodDescriptor getHalfBidiCallMethodHelper() { + io.grpc.MethodDescriptor getHalfBidiCallMethod; if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) { TestServiceGrpc.getHalfBidiCallMethod = getHalfBidiCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "HalfBidiCall")) + "grpc.testing.compiler.TestService", "HalfBidiCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("HalfBidiCall")) .build(); } @@ -217,34 +217,34 @@ public final class TestServiceGrpc { } @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getImportMethod()} instead. - public static final io.grpc.MethodDescriptor METHOD_IMPORT = getImportMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_IMPORT = getImportMethodHelper(); - private static volatile io.grpc.MethodDescriptor getImportMethod; + private static volatile io.grpc.MethodDescriptor getImportMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getImportMethod() { + public static io.grpc.MethodDescriptor getImportMethod() { return getImportMethodHelper(); } - private static io.grpc.MethodDescriptor getImportMethodHelper() { - io.grpc.MethodDescriptor getImportMethod; + private static io.grpc.MethodDescriptor getImportMethodHelper() { + io.grpc.MethodDescriptor getImportMethod; if ((getImportMethod = TestServiceGrpc.getImportMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getImportMethod = TestServiceGrpc.getImportMethod) == null) { TestServiceGrpc.getImportMethod = getImportMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "Import")) + "grpc.testing.compiler.TestService", "Import")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingInputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingInputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.grpc.testing.integration.Test.StreamingInputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingInputCallResponse.getDefaultInstance())) .setSchemaDescriptor(new TestServiceMethodDescriptorSupplier("Import")) .build(); } @@ -289,8 +289,8 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void unaryCall(io.grpc.testing.compiler.Test.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getUnaryCallMethodHelper(), responseObserver); } @@ -300,8 +300,8 @@ public final class TestServiceGrpc { * The server returns the payload with client desired type and sizes. * */ - public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void streamingOutputCall(io.grpc.testing.compiler.Test.StreamingOutputCallRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getStreamingOutputCallMethodHelper(), responseObserver); } @@ -311,8 +311,8 @@ public final class TestServiceGrpc { * The server returns the aggregated size of client payload as the result. * */ - public io.grpc.stub.StreamObserver streamingInputCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver streamingInputCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getStreamingInputCallMethodHelper(), responseObserver); } @@ -323,8 +323,8 @@ public final class TestServiceGrpc { * demonstrates the idea of full bidirectionality. * */ - public io.grpc.stub.StreamObserver fullBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver fullBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getFullBidiCallMethodHelper(), responseObserver); } @@ -336,8 +336,8 @@ public final class TestServiceGrpc { * first request. * */ - public io.grpc.stub.StreamObserver halfBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver halfBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getHalfBidiCallMethodHelper(), responseObserver); } @@ -347,8 +347,8 @@ public final class TestServiceGrpc { * method should have a '_' appended. * */ - public io.grpc.stub.StreamObserver import_( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver import_( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getImportMethodHelper(), responseObserver); } @@ -358,43 +358,43 @@ public final class TestServiceGrpc { getUnaryCallMethodHelper(), asyncUnaryCall( new MethodHandlers< - io.grpc.testing.integration.Test.SimpleRequest, - io.grpc.testing.integration.Test.SimpleResponse>( + io.grpc.testing.compiler.Test.SimpleRequest, + io.grpc.testing.compiler.Test.SimpleResponse>( this, METHODID_UNARY_CALL))) .addMethod( getStreamingOutputCallMethodHelper(), asyncServerStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingOutputCallRequest, - io.grpc.testing.integration.Test.StreamingOutputCallResponse>( + io.grpc.testing.compiler.Test.StreamingOutputCallRequest, + io.grpc.testing.compiler.Test.StreamingOutputCallResponse>( this, METHODID_STREAMING_OUTPUT_CALL))) .addMethod( getStreamingInputCallMethodHelper(), asyncClientStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingInputCallRequest, - io.grpc.testing.integration.Test.StreamingInputCallResponse>( + io.grpc.testing.compiler.Test.StreamingInputCallRequest, + io.grpc.testing.compiler.Test.StreamingInputCallResponse>( this, METHODID_STREAMING_INPUT_CALL))) .addMethod( getFullBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingOutputCallRequest, - io.grpc.testing.integration.Test.StreamingOutputCallResponse>( + io.grpc.testing.compiler.Test.StreamingOutputCallRequest, + io.grpc.testing.compiler.Test.StreamingOutputCallResponse>( this, METHODID_FULL_BIDI_CALL))) .addMethod( getHalfBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingOutputCallRequest, - io.grpc.testing.integration.Test.StreamingOutputCallResponse>( + io.grpc.testing.compiler.Test.StreamingOutputCallRequest, + io.grpc.testing.compiler.Test.StreamingOutputCallResponse>( this, METHODID_HALF_BIDI_CALL))) .addMethod( getImportMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingInputCallRequest, - io.grpc.testing.integration.Test.StreamingInputCallResponse>( + io.grpc.testing.compiler.Test.StreamingInputCallRequest, + io.grpc.testing.compiler.Test.StreamingInputCallResponse>( this, METHODID_IMPORT))) .build(); } @@ -427,8 +427,8 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void unaryCall(io.grpc.testing.compiler.Test.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request, responseObserver); } @@ -439,8 +439,8 @@ public final class TestServiceGrpc { * The server returns the payload with client desired type and sizes. * */ - public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void streamingOutputCall(io.grpc.testing.compiler.Test.StreamingOutputCallRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( getChannel().newCall(getStreamingOutputCallMethodHelper(), getCallOptions()), request, responseObserver); } @@ -451,8 +451,8 @@ public final class TestServiceGrpc { * The server returns the aggregated size of client payload as the result. * */ - public io.grpc.stub.StreamObserver streamingInputCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver streamingInputCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( getChannel().newCall(getStreamingInputCallMethodHelper(), getCallOptions()), responseObserver); } @@ -464,8 +464,8 @@ public final class TestServiceGrpc { * demonstrates the idea of full bidirectionality. * */ - public io.grpc.stub.StreamObserver fullBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver fullBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getFullBidiCallMethodHelper(), getCallOptions()), responseObserver); } @@ -478,8 +478,8 @@ public final class TestServiceGrpc { * first request. * */ - public io.grpc.stub.StreamObserver halfBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver halfBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getHalfBidiCallMethodHelper(), getCallOptions()), responseObserver); } @@ -490,8 +490,8 @@ public final class TestServiceGrpc { * method should have a '_' appended. * */ - public io.grpc.stub.StreamObserver import_( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver import_( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getImportMethodHelper(), getCallOptions()), responseObserver); } @@ -524,7 +524,7 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request) { + public io.grpc.testing.compiler.Test.SimpleResponse unaryCall(io.grpc.testing.compiler.Test.SimpleRequest request) { return blockingUnaryCall( getChannel(), getUnaryCallMethodHelper(), getCallOptions(), request); } @@ -535,8 +535,8 @@ public final class TestServiceGrpc { * The server returns the payload with client desired type and sizes. * */ - public java.util.Iterator streamingOutputCall( - io.grpc.testing.integration.Test.StreamingOutputCallRequest request) { + public java.util.Iterator streamingOutputCall( + io.grpc.testing.compiler.Test.StreamingOutputCallRequest request) { return blockingServerStreamingCall( getChannel(), getStreamingOutputCallMethodHelper(), getCallOptions(), request); } @@ -569,8 +569,8 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public com.google.common.util.concurrent.ListenableFuture unaryCall( - io.grpc.testing.integration.Test.SimpleRequest request) { + public com.google.common.util.concurrent.ListenableFuture unaryCall( + io.grpc.testing.compiler.Test.SimpleRequest request) { return futureUnaryCall( getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request); } @@ -601,12 +601,12 @@ public final class TestServiceGrpc { public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_UNARY_CALL: - serviceImpl.unaryCall((io.grpc.testing.integration.Test.SimpleRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.unaryCall((io.grpc.testing.compiler.Test.SimpleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_STREAMING_OUTPUT_CALL: - serviceImpl.streamingOutputCall((io.grpc.testing.integration.Test.StreamingOutputCallRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.streamingOutputCall((io.grpc.testing.compiler.Test.StreamingOutputCallRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); @@ -620,16 +620,16 @@ public final class TestServiceGrpc { switch (methodId) { case METHODID_STREAMING_INPUT_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.streamingInputCall( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_FULL_BIDI_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.fullBidiCall( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_HALF_BIDI_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.halfBidiCall( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_IMPORT: return (io.grpc.stub.StreamObserver) serviceImpl.import_( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } @@ -642,7 +642,7 @@ public final class TestServiceGrpc { @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return io.grpc.testing.integration.Test.getDescriptor(); + return io.grpc.testing.compiler.Test.getDescriptor(); } @java.lang.Override diff --git a/compiler/src/test/proto/test.proto b/compiler/src/test/proto/grpc/testing/compiler/test.proto similarity index 73% rename from compiler/src/test/proto/test.proto rename to compiler/src/test/proto/grpc/testing/compiler/test.proto index b565638a7e..4a5b20e040 100644 --- a/compiler/src/test/proto/test.proto +++ b/compiler/src/test/proto/grpc/testing/compiler/test.proto @@ -1,9 +1,24 @@ +// Copyright 2015, gRPC Authors +// All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // A simple service definition for testing the protoc plugin. syntax = "proto3"; -package grpc.testing; +package grpc.testing.compiler; -option java_package = "io.grpc.testing.integration"; +option java_package = "io.grpc.testing.compiler"; message SimpleRequest { } diff --git a/compiler/src/testLite/golden/TestService.java.txt b/compiler/src/testLite/golden/TestService.java.txt index bb1e904565..a22072cc4b 100644 --- a/compiler/src/testLite/golden/TestService.java.txt +++ b/compiler/src/testLite/golden/TestService.java.txt @@ -1,4 +1,4 @@ -package io.grpc.testing.integration; +package io.grpc.testing.compiler; import static io.grpc.MethodDescriptor.generateFullMethodName; import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; @@ -22,44 +22,44 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.13.0-SNAPSHOT)", - comments = "Source: test.proto") + comments = "Source: grpc/testing/compiler/test.proto") public final class TestServiceGrpc { private TestServiceGrpc() {} - public static final String SERVICE_NAME = "grpc.testing.TestService"; + public static final String SERVICE_NAME = "grpc.testing.compiler.TestService"; // Static method descriptors that strictly reflect the proto. @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 = getUnaryCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_UNARY_CALL = getUnaryCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; + private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getUnaryCallMethod() { + public static io.grpc.MethodDescriptor getUnaryCallMethod() { return getUnaryCallMethodHelper(); } - private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { - io.grpc.MethodDescriptor getUnaryCallMethod; + private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { + io.grpc.MethodDescriptor getUnaryCallMethod; if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { TestServiceGrpc.getUnaryCallMethod = getUnaryCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "UnaryCall")) + "grpc.testing.compiler.TestService", "UnaryCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.SimpleRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.SimpleRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.SimpleResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.SimpleResponse.getDefaultInstance())) .build(); } } @@ -68,34 +68,34 @@ 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 = getStreamingOutputCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; + private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { + public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { return getStreamingOutputCallMethodHelper(); } - private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { - io.grpc.MethodDescriptor getStreamingOutputCallMethod; + private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { + io.grpc.MethodDescriptor getStreamingOutputCallMethod; if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { TestServiceGrpc.getStreamingOutputCallMethod = getStreamingOutputCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "StreamingOutputCall")) + "grpc.testing.compiler.TestService", "StreamingOutputCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallResponse.getDefaultInstance())) .build(); } } @@ -104,34 +104,34 @@ 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 = getStreamingInputCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; + private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { + public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { return getStreamingInputCallMethodHelper(); } - private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { - io.grpc.MethodDescriptor getStreamingInputCallMethod; + private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { + io.grpc.MethodDescriptor getStreamingInputCallMethod; if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { TestServiceGrpc.getStreamingInputCallMethod = getStreamingInputCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "StreamingInputCall")) + "grpc.testing.compiler.TestService", "StreamingInputCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingInputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingInputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingInputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingInputCallResponse.getDefaultInstance())) .build(); } } @@ -140,34 +140,34 @@ 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 = getFullBidiCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_FULL_BIDI_CALL = getFullBidiCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getFullBidiCallMethod; + private static volatile io.grpc.MethodDescriptor getFullBidiCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getFullBidiCallMethod() { + public static io.grpc.MethodDescriptor getFullBidiCallMethod() { return getFullBidiCallMethodHelper(); } - private static io.grpc.MethodDescriptor getFullBidiCallMethodHelper() { - io.grpc.MethodDescriptor getFullBidiCallMethod; + private static io.grpc.MethodDescriptor getFullBidiCallMethodHelper() { + io.grpc.MethodDescriptor getFullBidiCallMethod; if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) { TestServiceGrpc.getFullBidiCallMethod = getFullBidiCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "FullBidiCall")) + "grpc.testing.compiler.TestService", "FullBidiCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallResponse.getDefaultInstance())) .build(); } } @@ -176,34 +176,34 @@ 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 = getHalfBidiCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_HALF_BIDI_CALL = getHalfBidiCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getHalfBidiCallMethod; + private static volatile io.grpc.MethodDescriptor getHalfBidiCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getHalfBidiCallMethod() { + public static io.grpc.MethodDescriptor getHalfBidiCallMethod() { return getHalfBidiCallMethodHelper(); } - private static io.grpc.MethodDescriptor getHalfBidiCallMethodHelper() { - io.grpc.MethodDescriptor getHalfBidiCallMethod; + private static io.grpc.MethodDescriptor getHalfBidiCallMethodHelper() { + io.grpc.MethodDescriptor getHalfBidiCallMethod; if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) { TestServiceGrpc.getHalfBidiCallMethod = getHalfBidiCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "HalfBidiCall")) + "grpc.testing.compiler.TestService", "HalfBidiCall")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingOutputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingOutputCallResponse.getDefaultInstance())) .build(); } } @@ -212,34 +212,34 @@ public final class TestServiceGrpc { } @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getImportMethod()} instead. - public static final io.grpc.MethodDescriptor METHOD_IMPORT = getImportMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_IMPORT = getImportMethodHelper(); - private static volatile io.grpc.MethodDescriptor getImportMethod; + private static volatile io.grpc.MethodDescriptor getImportMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getImportMethod() { + public static io.grpc.MethodDescriptor getImportMethod() { return getImportMethodHelper(); } - private static io.grpc.MethodDescriptor getImportMethodHelper() { - io.grpc.MethodDescriptor getImportMethod; + private static io.grpc.MethodDescriptor getImportMethodHelper() { + io.grpc.MethodDescriptor getImportMethod; if ((getImportMethod = TestServiceGrpc.getImportMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getImportMethod = TestServiceGrpc.getImportMethod) == null) { TestServiceGrpc.getImportMethod = getImportMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "Import")) + "grpc.testing.compiler.TestService", "Import")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingInputCallRequest.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingInputCallRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( - io.grpc.testing.integration.Test.StreamingInputCallResponse.getDefaultInstance())) + io.grpc.testing.compiler.Test.StreamingInputCallResponse.getDefaultInstance())) .build(); } } @@ -283,8 +283,8 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void unaryCall(io.grpc.testing.compiler.Test.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getUnaryCallMethodHelper(), responseObserver); } @@ -294,8 +294,8 @@ public final class TestServiceGrpc { * The server returns the payload with client desired type and sizes. * */ - public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void streamingOutputCall(io.grpc.testing.compiler.Test.StreamingOutputCallRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getStreamingOutputCallMethodHelper(), responseObserver); } @@ -305,8 +305,8 @@ public final class TestServiceGrpc { * The server returns the aggregated size of client payload as the result. * */ - public io.grpc.stub.StreamObserver streamingInputCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver streamingInputCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getStreamingInputCallMethodHelper(), responseObserver); } @@ -317,8 +317,8 @@ public final class TestServiceGrpc { * demonstrates the idea of full bidirectionality. * */ - public io.grpc.stub.StreamObserver fullBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver fullBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getFullBidiCallMethodHelper(), responseObserver); } @@ -330,8 +330,8 @@ public final class TestServiceGrpc { * first request. * */ - public io.grpc.stub.StreamObserver halfBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver halfBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getHalfBidiCallMethodHelper(), responseObserver); } @@ -341,8 +341,8 @@ public final class TestServiceGrpc { * method should have a '_' appended. * */ - public io.grpc.stub.StreamObserver import_( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver import_( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getImportMethodHelper(), responseObserver); } @@ -352,43 +352,43 @@ public final class TestServiceGrpc { getUnaryCallMethodHelper(), asyncUnaryCall( new MethodHandlers< - io.grpc.testing.integration.Test.SimpleRequest, - io.grpc.testing.integration.Test.SimpleResponse>( + io.grpc.testing.compiler.Test.SimpleRequest, + io.grpc.testing.compiler.Test.SimpleResponse>( this, METHODID_UNARY_CALL))) .addMethod( getStreamingOutputCallMethodHelper(), asyncServerStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingOutputCallRequest, - io.grpc.testing.integration.Test.StreamingOutputCallResponse>( + io.grpc.testing.compiler.Test.StreamingOutputCallRequest, + io.grpc.testing.compiler.Test.StreamingOutputCallResponse>( this, METHODID_STREAMING_OUTPUT_CALL))) .addMethod( getStreamingInputCallMethodHelper(), asyncClientStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingInputCallRequest, - io.grpc.testing.integration.Test.StreamingInputCallResponse>( + io.grpc.testing.compiler.Test.StreamingInputCallRequest, + io.grpc.testing.compiler.Test.StreamingInputCallResponse>( this, METHODID_STREAMING_INPUT_CALL))) .addMethod( getFullBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingOutputCallRequest, - io.grpc.testing.integration.Test.StreamingOutputCallResponse>( + io.grpc.testing.compiler.Test.StreamingOutputCallRequest, + io.grpc.testing.compiler.Test.StreamingOutputCallResponse>( this, METHODID_FULL_BIDI_CALL))) .addMethod( getHalfBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingOutputCallRequest, - io.grpc.testing.integration.Test.StreamingOutputCallResponse>( + io.grpc.testing.compiler.Test.StreamingOutputCallRequest, + io.grpc.testing.compiler.Test.StreamingOutputCallResponse>( this, METHODID_HALF_BIDI_CALL))) .addMethod( getImportMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.testing.integration.Test.StreamingInputCallRequest, - io.grpc.testing.integration.Test.StreamingInputCallResponse>( + io.grpc.testing.compiler.Test.StreamingInputCallRequest, + io.grpc.testing.compiler.Test.StreamingInputCallResponse>( this, METHODID_IMPORT))) .build(); } @@ -421,8 +421,8 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void unaryCall(io.grpc.testing.compiler.Test.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request, responseObserver); } @@ -433,8 +433,8 @@ public final class TestServiceGrpc { * The server returns the payload with client desired type and sizes. * */ - public void streamingOutputCall(io.grpc.testing.integration.Test.StreamingOutputCallRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void streamingOutputCall(io.grpc.testing.compiler.Test.StreamingOutputCallRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( getChannel().newCall(getStreamingOutputCallMethodHelper(), getCallOptions()), request, responseObserver); } @@ -445,8 +445,8 @@ public final class TestServiceGrpc { * The server returns the aggregated size of client payload as the result. * */ - public io.grpc.stub.StreamObserver streamingInputCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver streamingInputCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( getChannel().newCall(getStreamingInputCallMethodHelper(), getCallOptions()), responseObserver); } @@ -458,8 +458,8 @@ public final class TestServiceGrpc { * demonstrates the idea of full bidirectionality. * */ - public io.grpc.stub.StreamObserver fullBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver fullBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getFullBidiCallMethodHelper(), getCallOptions()), responseObserver); } @@ -472,8 +472,8 @@ public final class TestServiceGrpc { * first request. * */ - public io.grpc.stub.StreamObserver halfBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver halfBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getHalfBidiCallMethodHelper(), getCallOptions()), responseObserver); } @@ -484,8 +484,8 @@ public final class TestServiceGrpc { * method should have a '_' appended. * */ - public io.grpc.stub.StreamObserver import_( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver import_( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getImportMethodHelper(), getCallOptions()), responseObserver); } @@ -518,7 +518,7 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public io.grpc.testing.integration.Test.SimpleResponse unaryCall(io.grpc.testing.integration.Test.SimpleRequest request) { + public io.grpc.testing.compiler.Test.SimpleResponse unaryCall(io.grpc.testing.compiler.Test.SimpleRequest request) { return blockingUnaryCall( getChannel(), getUnaryCallMethodHelper(), getCallOptions(), request); } @@ -529,8 +529,8 @@ public final class TestServiceGrpc { * The server returns the payload with client desired type and sizes. * */ - public java.util.Iterator streamingOutputCall( - io.grpc.testing.integration.Test.StreamingOutputCallRequest request) { + public java.util.Iterator streamingOutputCall( + io.grpc.testing.compiler.Test.StreamingOutputCallRequest request) { return blockingServerStreamingCall( getChannel(), getStreamingOutputCallMethodHelper(), getCallOptions(), request); } @@ -563,8 +563,8 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public com.google.common.util.concurrent.ListenableFuture unaryCall( - io.grpc.testing.integration.Test.SimpleRequest request) { + public com.google.common.util.concurrent.ListenableFuture unaryCall( + io.grpc.testing.compiler.Test.SimpleRequest request) { return futureUnaryCall( getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request); } @@ -595,12 +595,12 @@ public final class TestServiceGrpc { public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_UNARY_CALL: - serviceImpl.unaryCall((io.grpc.testing.integration.Test.SimpleRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.unaryCall((io.grpc.testing.compiler.Test.SimpleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_STREAMING_OUTPUT_CALL: - serviceImpl.streamingOutputCall((io.grpc.testing.integration.Test.StreamingOutputCallRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.streamingOutputCall((io.grpc.testing.compiler.Test.StreamingOutputCallRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); @@ -614,16 +614,16 @@ public final class TestServiceGrpc { switch (methodId) { case METHODID_STREAMING_INPUT_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.streamingInputCall( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_FULL_BIDI_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.fullBidiCall( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_HALF_BIDI_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.halfBidiCall( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_IMPORT: return (io.grpc.stub.StreamObserver) serviceImpl.import_( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } diff --git a/compiler/src/testNano/golden/TestService.java.txt b/compiler/src/testNano/golden/TestService.java.txt index 6672520d82..5c44954b9a 100644 --- a/compiler/src/testNano/golden/TestService.java.txt +++ b/compiler/src/testNano/golden/TestService.java.txt @@ -1,4 +1,4 @@ -package io.grpc.testing.integration.nano; +package io.grpc.testing.compiler.nano; import static io.grpc.MethodDescriptor.generateFullMethodName; import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; @@ -24,46 +24,46 @@ import java.io.IOException; */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.13.0-SNAPSHOT)", - comments = "Source: test.proto") + comments = "Source: grpc/testing/compiler/test.proto") public final class TestServiceGrpc { private TestServiceGrpc() {} - public static final String SERVICE_NAME = "grpc.testing.TestService"; + public static final String SERVICE_NAME = "grpc.testing.compiler.TestService"; // Static method descriptors that strictly reflect the proto. private static final int ARG_IN_METHOD_UNARY_CALL = 0; private static final int ARG_OUT_METHOD_UNARY_CALL = 1; @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 = getUnaryCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_UNARY_CALL = getUnaryCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; + private static volatile io.grpc.MethodDescriptor getUnaryCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getUnaryCallMethod() { + public static io.grpc.MethodDescriptor getUnaryCallMethod() { return getUnaryCallMethodHelper(); } - private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { - io.grpc.MethodDescriptor getUnaryCallMethod; + private static io.grpc.MethodDescriptor getUnaryCallMethodHelper() { + io.grpc.MethodDescriptor getUnaryCallMethod; if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getUnaryCallMethod = TestServiceGrpc.getUnaryCallMethod) == null) { TestServiceGrpc.getUnaryCallMethod = getUnaryCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "UnaryCall")) + "grpc.testing.compiler.TestService", "UnaryCall")) .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_IN_METHOD_UNARY_CALL))) - .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_OUT_METHOD_UNARY_CALL))) + .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_IN_METHOD_UNARY_CALL))) + .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_OUT_METHOD_UNARY_CALL))) .build(); } } @@ -74,34 +74,34 @@ public final class TestServiceGrpc { private static final int ARG_OUT_METHOD_STREAMING_OUTPUT_CALL = 3; @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 = getStreamingOutputCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_STREAMING_OUTPUT_CALL = getStreamingOutputCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; + private static volatile io.grpc.MethodDescriptor getStreamingOutputCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { + public static io.grpc.MethodDescriptor getStreamingOutputCallMethod() { return getStreamingOutputCallMethodHelper(); } - private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { - io.grpc.MethodDescriptor getStreamingOutputCallMethod; + private static io.grpc.MethodDescriptor getStreamingOutputCallMethodHelper() { + io.grpc.MethodDescriptor getStreamingOutputCallMethod; if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getStreamingOutputCallMethod = TestServiceGrpc.getStreamingOutputCallMethod) == null) { TestServiceGrpc.getStreamingOutputCallMethod = getStreamingOutputCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "StreamingOutputCall")) + "grpc.testing.compiler.TestService", "StreamingOutputCall")) .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_IN_METHOD_STREAMING_OUTPUT_CALL))) - .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_OUT_METHOD_STREAMING_OUTPUT_CALL))) + .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_IN_METHOD_STREAMING_OUTPUT_CALL))) + .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_OUT_METHOD_STREAMING_OUTPUT_CALL))) .build(); } } @@ -112,34 +112,34 @@ public final class TestServiceGrpc { private static final int ARG_OUT_METHOD_STREAMING_INPUT_CALL = 5; @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 = getStreamingInputCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_STREAMING_INPUT_CALL = getStreamingInputCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; + private static volatile io.grpc.MethodDescriptor getStreamingInputCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { + public static io.grpc.MethodDescriptor getStreamingInputCallMethod() { return getStreamingInputCallMethodHelper(); } - private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { - io.grpc.MethodDescriptor getStreamingInputCallMethod; + private static io.grpc.MethodDescriptor getStreamingInputCallMethodHelper() { + io.grpc.MethodDescriptor getStreamingInputCallMethod; if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getStreamingInputCallMethod = TestServiceGrpc.getStreamingInputCallMethod) == null) { TestServiceGrpc.getStreamingInputCallMethod = getStreamingInputCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "StreamingInputCall")) + "grpc.testing.compiler.TestService", "StreamingInputCall")) .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_IN_METHOD_STREAMING_INPUT_CALL))) - .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_OUT_METHOD_STREAMING_INPUT_CALL))) + .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_IN_METHOD_STREAMING_INPUT_CALL))) + .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_OUT_METHOD_STREAMING_INPUT_CALL))) .build(); } } @@ -150,34 +150,34 @@ public final class TestServiceGrpc { private static final int ARG_OUT_METHOD_FULL_BIDI_CALL = 7; @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 = getFullBidiCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_FULL_BIDI_CALL = getFullBidiCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getFullBidiCallMethod; + private static volatile io.grpc.MethodDescriptor getFullBidiCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getFullBidiCallMethod() { + public static io.grpc.MethodDescriptor getFullBidiCallMethod() { return getFullBidiCallMethodHelper(); } - private static io.grpc.MethodDescriptor getFullBidiCallMethodHelper() { - io.grpc.MethodDescriptor getFullBidiCallMethod; + private static io.grpc.MethodDescriptor getFullBidiCallMethodHelper() { + io.grpc.MethodDescriptor getFullBidiCallMethod; if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getFullBidiCallMethod = TestServiceGrpc.getFullBidiCallMethod) == null) { TestServiceGrpc.getFullBidiCallMethod = getFullBidiCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "FullBidiCall")) + "grpc.testing.compiler.TestService", "FullBidiCall")) .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_IN_METHOD_FULL_BIDI_CALL))) - .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_OUT_METHOD_FULL_BIDI_CALL))) + .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_IN_METHOD_FULL_BIDI_CALL))) + .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_OUT_METHOD_FULL_BIDI_CALL))) .build(); } } @@ -188,34 +188,34 @@ public final class TestServiceGrpc { private static final int ARG_OUT_METHOD_HALF_BIDI_CALL = 9; @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 = getHalfBidiCallMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_HALF_BIDI_CALL = getHalfBidiCallMethodHelper(); - private static volatile io.grpc.MethodDescriptor getHalfBidiCallMethod; + private static volatile io.grpc.MethodDescriptor getHalfBidiCallMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getHalfBidiCallMethod() { + public static io.grpc.MethodDescriptor getHalfBidiCallMethod() { return getHalfBidiCallMethodHelper(); } - private static io.grpc.MethodDescriptor getHalfBidiCallMethodHelper() { - io.grpc.MethodDescriptor getHalfBidiCallMethod; + private static io.grpc.MethodDescriptor getHalfBidiCallMethodHelper() { + io.grpc.MethodDescriptor getHalfBidiCallMethod; if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getHalfBidiCallMethod = TestServiceGrpc.getHalfBidiCallMethod) == null) { TestServiceGrpc.getHalfBidiCallMethod = getHalfBidiCallMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "HalfBidiCall")) + "grpc.testing.compiler.TestService", "HalfBidiCall")) .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_IN_METHOD_HALF_BIDI_CALL))) - .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_OUT_METHOD_HALF_BIDI_CALL))) + .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_IN_METHOD_HALF_BIDI_CALL))) + .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_OUT_METHOD_HALF_BIDI_CALL))) .build(); } } @@ -226,34 +226,34 @@ public final class TestServiceGrpc { private static final int ARG_OUT_METHOD_IMPORT = 11; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getImportMethod()} instead. - public static final io.grpc.MethodDescriptor METHOD_IMPORT = getImportMethodHelper(); + public static final io.grpc.MethodDescriptor METHOD_IMPORT = getImportMethodHelper(); - private static volatile io.grpc.MethodDescriptor getImportMethod; + private static volatile io.grpc.MethodDescriptor getImportMethod; @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor getImportMethod() { + public static io.grpc.MethodDescriptor getImportMethod() { return getImportMethodHelper(); } - private static io.grpc.MethodDescriptor getImportMethodHelper() { - io.grpc.MethodDescriptor getImportMethod; + private static io.grpc.MethodDescriptor getImportMethodHelper() { + io.grpc.MethodDescriptor getImportMethod; if ((getImportMethod = TestServiceGrpc.getImportMethod) == null) { synchronized (TestServiceGrpc.class) { if ((getImportMethod = TestServiceGrpc.getImportMethod) == null) { TestServiceGrpc.getImportMethod = getImportMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName( - "grpc.testing.TestService", "Import")) + "grpc.testing.compiler.TestService", "Import")) .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_IN_METHOD_IMPORT))) - .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( - new NanoFactory(ARG_OUT_METHOD_IMPORT))) + .setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_IN_METHOD_IMPORT))) + .setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.marshaller( + new NanoFactory(ARG_OUT_METHOD_IMPORT))) .build(); } } @@ -274,40 +274,40 @@ public final class TestServiceGrpc { Object o; switch (id) { case ARG_IN_METHOD_UNARY_CALL: - o = new io.grpc.testing.integration.nano.Test.SimpleRequest(); + o = new io.grpc.testing.compiler.nano.Test.SimpleRequest(); break; case ARG_OUT_METHOD_UNARY_CALL: - o = new io.grpc.testing.integration.nano.Test.SimpleResponse(); + o = new io.grpc.testing.compiler.nano.Test.SimpleResponse(); break; case ARG_IN_METHOD_STREAMING_OUTPUT_CALL: - o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest(); + o = new io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest(); break; case ARG_OUT_METHOD_STREAMING_OUTPUT_CALL: - o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse(); + o = new io.grpc.testing.compiler.nano.Test.StreamingOutputCallResponse(); break; case ARG_IN_METHOD_STREAMING_INPUT_CALL: - o = new io.grpc.testing.integration.nano.Test.StreamingInputCallRequest(); + o = new io.grpc.testing.compiler.nano.Test.StreamingInputCallRequest(); break; case ARG_OUT_METHOD_STREAMING_INPUT_CALL: - o = new io.grpc.testing.integration.nano.Test.StreamingInputCallResponse(); + o = new io.grpc.testing.compiler.nano.Test.StreamingInputCallResponse(); break; case ARG_IN_METHOD_FULL_BIDI_CALL: - o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest(); + o = new io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest(); break; case ARG_OUT_METHOD_FULL_BIDI_CALL: - o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse(); + o = new io.grpc.testing.compiler.nano.Test.StreamingOutputCallResponse(); break; case ARG_IN_METHOD_HALF_BIDI_CALL: - o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest(); + o = new io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest(); break; case ARG_OUT_METHOD_HALF_BIDI_CALL: - o = new io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse(); + o = new io.grpc.testing.compiler.nano.Test.StreamingOutputCallResponse(); break; case ARG_IN_METHOD_IMPORT: - o = new io.grpc.testing.integration.nano.Test.StreamingInputCallRequest(); + o = new io.grpc.testing.compiler.nano.Test.StreamingInputCallRequest(); break; case ARG_OUT_METHOD_IMPORT: - o = new io.grpc.testing.integration.nano.Test.StreamingInputCallResponse(); + o = new io.grpc.testing.compiler.nano.Test.StreamingInputCallResponse(); break; default: throw new AssertionError(); @@ -354,8 +354,8 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void unaryCall(io.grpc.testing.compiler.nano.Test.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getUnaryCallMethodHelper(), responseObserver); } @@ -365,8 +365,8 @@ public final class TestServiceGrpc { * The server returns the payload with client desired type and sizes. * */ - public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void streamingOutputCall(io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncUnimplementedUnaryCall(getStreamingOutputCallMethodHelper(), responseObserver); } @@ -376,8 +376,8 @@ public final class TestServiceGrpc { * The server returns the aggregated size of client payload as the result. * */ - public io.grpc.stub.StreamObserver streamingInputCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver streamingInputCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getStreamingInputCallMethodHelper(), responseObserver); } @@ -388,8 +388,8 @@ public final class TestServiceGrpc { * demonstrates the idea of full bidirectionality. * */ - public io.grpc.stub.StreamObserver fullBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver fullBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getFullBidiCallMethodHelper(), responseObserver); } @@ -401,8 +401,8 @@ public final class TestServiceGrpc { * first request. * */ - public io.grpc.stub.StreamObserver halfBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver halfBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getHalfBidiCallMethodHelper(), responseObserver); } @@ -412,8 +412,8 @@ public final class TestServiceGrpc { * method should have a '_' appended. * */ - public io.grpc.stub.StreamObserver import_( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver import_( + io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getImportMethodHelper(), responseObserver); } @@ -423,43 +423,43 @@ public final class TestServiceGrpc { getUnaryCallMethodHelper(), asyncUnaryCall( new MethodHandlers< - io.grpc.testing.integration.nano.Test.SimpleRequest, - io.grpc.testing.integration.nano.Test.SimpleResponse>( + io.grpc.testing.compiler.nano.Test.SimpleRequest, + io.grpc.testing.compiler.nano.Test.SimpleResponse>( this, METHODID_UNARY_CALL))) .addMethod( getStreamingOutputCallMethodHelper(), asyncServerStreamingCall( new MethodHandlers< - io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, - io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>( + io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest, + io.grpc.testing.compiler.nano.Test.StreamingOutputCallResponse>( this, METHODID_STREAMING_OUTPUT_CALL))) .addMethod( getStreamingInputCallMethodHelper(), asyncClientStreamingCall( new MethodHandlers< - io.grpc.testing.integration.nano.Test.StreamingInputCallRequest, - io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>( + io.grpc.testing.compiler.nano.Test.StreamingInputCallRequest, + io.grpc.testing.compiler.nano.Test.StreamingInputCallResponse>( this, METHODID_STREAMING_INPUT_CALL))) .addMethod( getFullBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, - io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>( + io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest, + io.grpc.testing.compiler.nano.Test.StreamingOutputCallResponse>( this, METHODID_FULL_BIDI_CALL))) .addMethod( getHalfBidiCallMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest, - io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>( + io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest, + io.grpc.testing.compiler.nano.Test.StreamingOutputCallResponse>( this, METHODID_HALF_BIDI_CALL))) .addMethod( getImportMethodHelper(), asyncBidiStreamingCall( new MethodHandlers< - io.grpc.testing.integration.nano.Test.StreamingInputCallRequest, - io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>( + io.grpc.testing.compiler.nano.Test.StreamingInputCallRequest, + io.grpc.testing.compiler.nano.Test.StreamingInputCallResponse>( this, METHODID_IMPORT))) .build(); } @@ -492,8 +492,8 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public void unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void unaryCall(io.grpc.testing.compiler.nano.Test.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncUnaryCall( getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request, responseObserver); } @@ -504,8 +504,8 @@ public final class TestServiceGrpc { * The server returns the payload with client desired type and sizes. * */ - public void streamingOutputCall(io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void streamingOutputCall(io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest request, + io.grpc.stub.StreamObserver responseObserver) { asyncServerStreamingCall( getChannel().newCall(getStreamingOutputCallMethodHelper(), getCallOptions()), request, responseObserver); } @@ -516,8 +516,8 @@ public final class TestServiceGrpc { * The server returns the aggregated size of client payload as the result. * */ - public io.grpc.stub.StreamObserver streamingInputCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver streamingInputCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncClientStreamingCall( getChannel().newCall(getStreamingInputCallMethodHelper(), getCallOptions()), responseObserver); } @@ -529,8 +529,8 @@ public final class TestServiceGrpc { * demonstrates the idea of full bidirectionality. * */ - public io.grpc.stub.StreamObserver fullBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver fullBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getFullBidiCallMethodHelper(), getCallOptions()), responseObserver); } @@ -543,8 +543,8 @@ public final class TestServiceGrpc { * first request. * */ - public io.grpc.stub.StreamObserver halfBidiCall( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver halfBidiCall( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getHalfBidiCallMethodHelper(), getCallOptions()), responseObserver); } @@ -555,8 +555,8 @@ public final class TestServiceGrpc { * method should have a '_' appended. * */ - public io.grpc.stub.StreamObserver import_( - io.grpc.stub.StreamObserver responseObserver) { + public io.grpc.stub.StreamObserver import_( + io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getImportMethodHelper(), getCallOptions()), responseObserver); } @@ -589,7 +589,7 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public io.grpc.testing.integration.nano.Test.SimpleResponse unaryCall(io.grpc.testing.integration.nano.Test.SimpleRequest request) { + public io.grpc.testing.compiler.nano.Test.SimpleResponse unaryCall(io.grpc.testing.compiler.nano.Test.SimpleRequest request) { return blockingUnaryCall( getChannel(), getUnaryCallMethodHelper(), getCallOptions(), request); } @@ -600,8 +600,8 @@ public final class TestServiceGrpc { * The server returns the payload with client desired type and sizes. * */ - public java.util.Iterator streamingOutputCall( - io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest request) { + public java.util.Iterator streamingOutputCall( + io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest request) { return blockingServerStreamingCall( getChannel(), getStreamingOutputCallMethodHelper(), getCallOptions(), request); } @@ -634,8 +634,8 @@ public final class TestServiceGrpc { * The server returns the client payload as-is. * */ - public com.google.common.util.concurrent.ListenableFuture unaryCall( - io.grpc.testing.integration.nano.Test.SimpleRequest request) { + public com.google.common.util.concurrent.ListenableFuture unaryCall( + io.grpc.testing.compiler.nano.Test.SimpleRequest request) { return futureUnaryCall( getChannel().newCall(getUnaryCallMethodHelper(), getCallOptions()), request); } @@ -666,12 +666,12 @@ public final class TestServiceGrpc { public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_UNARY_CALL: - serviceImpl.unaryCall((io.grpc.testing.integration.nano.Test.SimpleRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.unaryCall((io.grpc.testing.compiler.nano.Test.SimpleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_STREAMING_OUTPUT_CALL: - serviceImpl.streamingOutputCall((io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.streamingOutputCall((io.grpc.testing.compiler.nano.Test.StreamingOutputCallRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); @@ -685,16 +685,16 @@ public final class TestServiceGrpc { switch (methodId) { case METHODID_STREAMING_INPUT_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.streamingInputCall( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_FULL_BIDI_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.fullBidiCall( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_HALF_BIDI_CALL: return (io.grpc.stub.StreamObserver) serviceImpl.halfBidiCall( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); case METHODID_IMPORT: return (io.grpc.stub.StreamObserver) serviceImpl.import_( - (io.grpc.stub.StreamObserver) responseObserver); + (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); }