compiler: deprecate interfaces and add ImplBase in codegen
first step to address issue #1469:
- leave and deprecate interfaces in codegen
- introduce `ServiceImplBase`,
- `AbstractService` is deprecated and extends `ServiceImplBase`
- static `bindService()` is deprecated
diff --git a/compiler/src/testLite/golden/TestService.java.txt b/compiler/src/testLite/golden/TestService.java.txt
index 7eb5472..f47dcc5 100644
--- a/compiler/src/testLite/golden/TestService.java.txt
+++ b/compiler/src/testLite/golden/TestService.java.txt
@@ -104,7 +104,7 @@
* Test service that supports all call types.
* </pre>
*/
- public static interface TestService {
+ @java.lang.Deprecated public static interface TestService {
/**
* <pre>
@@ -156,7 +156,7 @@
}
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1469")
- public static abstract class AbstractTestService implements TestService, io.grpc.BindableService {
+ public static abstract class TestServiceImplBase implements TestService, io.grpc.BindableService {
@java.lang.Override
public void unaryCall(io.grpc.testing.integration.Test.SimpleRequest request,
@@ -198,7 +198,7 @@
* Test service that supports all call types.
* </pre>
*/
- public static interface TestServiceBlockingClient {
+ @java.lang.Deprecated public static interface TestServiceBlockingClient {
/**
* <pre>
@@ -223,7 +223,7 @@
* Test service that supports all call types.
* </pre>
*/
- public static interface TestServiceFutureClient {
+ @java.lang.Deprecated public static interface TestServiceFutureClient {
/**
* <pre>
@@ -344,6 +344,8 @@
}
}
+ @java.lang.Deprecated public static abstract class AbstractTestService extends TestServiceImplBase {}
+
private static final int METHODID_UNARY_CALL = 0;
private static final int METHODID_STREAMING_OUTPUT_CALL = 1;
private static final int METHODID_STREAMING_INPUT_CALL = 2;
@@ -409,7 +411,7 @@
METHOD_HALF_BIDI_CALL);
}
- public static io.grpc.ServerServiceDefinition bindService(
+ @java.lang.Deprecated public static io.grpc.ServerServiceDefinition bindService(
final TestService serviceImpl) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(