diff --git a/alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java b/alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java
index 662b6ff3e0c..6e6fdd8f00b 100644
--- a/alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java
+++ b/alts/src/generated/main/grpc/io/grpc/alts/internal/HandshakerServiceGrpc.java
@@ -92,7 +92,7 @@ public HandshakerServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.Call
/**
*/
- public static abstract class HandshakerServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
@@ -104,27 +104,28 @@ public static abstract class HandshakerServiceImplBase implements io.grpc.Bindab
* response before sending next request.
*
*/
- public io.grpc.stub.StreamObserver doHandshake(
+ default io.grpc.stub.StreamObserver doHandshake(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getDoHandshakeMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service HandshakerService.
+ */
+ public static abstract class HandshakerServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getDoHandshakeMethod(),
- io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
- new MethodHandlers<
- io.grpc.alts.internal.HandshakerReq,
- io.grpc.alts.internal.HandshakerResp>(
- this, METHODID_DO_HANDSHAKE)))
- .build();
+ return HandshakerServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service HandshakerService.
*/
- public static final class HandshakerServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class HandshakerServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private HandshakerServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -154,8 +155,10 @@ public io.grpc.stub.StreamObserver doHandsh
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service HandshakerService.
*/
- public static final class HandshakerServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class HandshakerServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private HandshakerServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -169,8 +172,10 @@ protected HandshakerServiceBlockingStub build(
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service HandshakerService.
*/
- public static final class HandshakerServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class HandshakerServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private HandshakerServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -190,10 +195,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final HandshakerServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(HandshakerServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -221,6 +226,18 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getDoHandshakeMethod(),
+ io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
+ new MethodHandlers<
+ io.grpc.alts.internal.HandshakerReq,
+ io.grpc.alts.internal.HandshakerResp>(
+ service, METHODID_DO_HANDSHAKE)))
+ .build();
+ }
+
private static abstract class HandshakerServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
HandshakerServiceBaseDescriptorSupplier() {}
diff --git a/alts/src/test/java/io/grpc/alts/HandshakerServiceChannelTest.java b/alts/src/test/java/io/grpc/alts/HandshakerServiceChannelTest.java
index dc297492fe3..a3937904cd7 100644
--- a/alts/src/test/java/io/grpc/alts/HandshakerServiceChannelTest.java
+++ b/alts/src/test/java/io/grpc/alts/HandshakerServiceChannelTest.java
@@ -46,7 +46,7 @@ public void unaryRpc(SimpleRequest request, StreamObserver so) {
so.onCompleted();
}
})
- .build());
+ .build());
private Resource resource;
@Before
diff --git a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java
index cd2bf958508..24c8d6189cc 100644
--- a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java
+++ b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java
@@ -127,14 +127,14 @@ public LoadBalancerStatsServiceFutureStub newStub(io.grpc.Channel channel, io.gr
* A service used to obtain stats for verifying LB behavior.
*
*/
- public static abstract class LoadBalancerStatsServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
* Gets the backend distribution for RPCs sent by a test client.
*
*/
- public void getClientStats(io.grpc.testing.integration.Messages.LoadBalancerStatsRequest request,
+ default void getClientStats(io.grpc.testing.integration.Messages.LoadBalancerStatsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClientStatsMethod(), responseObserver);
}
@@ -144,37 +144,34 @@ public void getClientStats(io.grpc.testing.integration.Messages.LoadBalancerStat
* Gets the accumulated stats for RPCs sent by a test client.
*
*/
- public void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request,
+ default void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClientAccumulatedStatsMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service LoadBalancerStatsService.
+ *
+ * A service used to obtain stats for verifying LB behavior.
+ *
+ */
+ public static abstract class LoadBalancerStatsServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getGetClientStatsMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.LoadBalancerStatsRequest,
- io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>(
- this, METHODID_GET_CLIENT_STATS)))
- .addMethod(
- getGetClientAccumulatedStatsMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
- io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>(
- this, METHODID_GET_CLIENT_ACCUMULATED_STATS)))
- .build();
+ return LoadBalancerStatsServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service LoadBalancerStatsService.
*
* A service used to obtain stats for verifying LB behavior.
*
*/
- public static final class LoadBalancerStatsServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class LoadBalancerStatsServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private LoadBalancerStatsServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -210,11 +207,13 @@ public void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadB
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service LoadBalancerStatsService.
*
* A service used to obtain stats for verifying LB behavior.
*
*/
- public static final class LoadBalancerStatsServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class LoadBalancerStatsServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private LoadBalancerStatsServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -248,11 +247,13 @@ public io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service LoadBalancerStatsService.
*
* A service used to obtain stats for verifying LB behavior.
*
*/
- public static final class LoadBalancerStatsServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class LoadBalancerStatsServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private LoadBalancerStatsServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -295,10 +296,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final LoadBalancerStatsServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(LoadBalancerStatsServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -331,6 +332,25 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getGetClientStatsMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.LoadBalancerStatsRequest,
+ io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>(
+ service, METHODID_GET_CLIENT_STATS)))
+ .addMethod(
+ getGetClientAccumulatedStatsMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
+ io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>(
+ service, METHODID_GET_CLIENT_ACCUMULATED_STATS)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java
index e3e9bc1dc35..0fc49afb5ea 100644
--- a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java
+++ b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java
@@ -121,7 +121,7 @@ public MetricsServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOpt
/**
*/
- public static abstract class MetricsServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
@@ -129,7 +129,7 @@ public static abstract class MetricsServiceImplBase implements io.grpc.BindableS
* the service
*
*/
- public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request,
+ default void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAllGaugesMethod(), responseObserver);
}
@@ -139,34 +139,28 @@ public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage reques
* Returns the value of one gauge
*
*/
- public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request,
+ default void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGaugeMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service MetricsService.
+ */
+ public static abstract class MetricsServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getGetAllGaugesMethod(),
- io.grpc.stub.ServerCalls.asyncServerStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Metrics.EmptyMessage,
- io.grpc.testing.integration.Metrics.GaugeResponse>(
- this, METHODID_GET_ALL_GAUGES)))
- .addMethod(
- getGetGaugeMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Metrics.GaugeRequest,
- io.grpc.testing.integration.Metrics.GaugeResponse>(
- this, METHODID_GET_GAUGE)))
- .build();
+ return MetricsServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service MetricsService.
*/
- public static final class MetricsServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class MetricsServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private MetricsServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -203,8 +197,10 @@ public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request,
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service MetricsService.
*/
- public static final class MetricsServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class MetricsServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private MetricsServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -240,8 +236,10 @@ public io.grpc.testing.integration.Metrics.GaugeResponse getGauge(io.grpc.testin
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service MetricsService.
*/
- public static final class MetricsServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class MetricsServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private MetricsServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -273,10 +271,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final MetricsServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(MetricsServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -309,6 +307,25 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getGetAllGaugesMethod(),
+ io.grpc.stub.ServerCalls.asyncServerStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Metrics.EmptyMessage,
+ io.grpc.testing.integration.Metrics.GaugeResponse>(
+ service, METHODID_GET_ALL_GAUGES)))
+ .addMethod(
+ getGetGaugeMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Metrics.GaugeRequest,
+ io.grpc.testing.integration.Metrics.GaugeResponse>(
+ service, METHODID_GET_GAUGE)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
index 476e9cc03a1..93f97349e83 100644
--- a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
+++ b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
@@ -127,48 +127,45 @@ public ReconnectServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallO
* A service used to control reconnect server.
*
*/
- public static abstract class ReconnectServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*/
- public void start(io.grpc.testing.integration.Messages.ReconnectParams request,
+ default void start(io.grpc.testing.integration.Messages.ReconnectParams request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartMethod(), responseObserver);
}
/**
*/
- public void stop(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void stop(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service ReconnectService.
+ *
+ * A service used to control reconnect server.
+ *
+ */
+ public static abstract class ReconnectServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getStartMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.ReconnectParams,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_START)))
- .addMethod(
- getStopMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.Messages.ReconnectInfo>(
- this, METHODID_STOP)))
- .build();
+ return ReconnectServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service ReconnectService.
*
* A service used to control reconnect server.
*
*/
- public static final class ReconnectServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class ReconnectServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private ReconnectServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -198,11 +195,13 @@ public void stop(io.grpc.testing.integration.EmptyProtos.Empty request,
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service ReconnectService.
*
* A service used to control reconnect server.
*
*/
- public static final class ReconnectServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class ReconnectServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private ReconnectServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -230,11 +229,13 @@ public io.grpc.testing.integration.Messages.ReconnectInfo stop(io.grpc.testing.i
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service ReconnectService.
*
* A service used to control reconnect server.
*
*/
- public static final class ReconnectServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class ReconnectServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private ReconnectServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -271,10 +272,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final ReconnectServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(ReconnectServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -307,6 +308,25 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getStartMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.ReconnectParams,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_START)))
+ .addMethod(
+ getStopMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.Messages.ReconnectInfo>(
+ service, METHODID_STOP)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/TestServiceGrpc.java b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/TestServiceGrpc.java
index 3569dbc5292..8b9c3c899fd 100644
--- a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/TestServiceGrpc.java
+++ b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/TestServiceGrpc.java
@@ -309,14 +309,14 @@ public TestServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOption
* performance with various types of payload.
*
*/
- public static abstract class TestServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
* One empty request followed by one empty response.
*
*/
- public void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEmptyCallMethod(), responseObserver);
}
@@ -326,7 +326,7 @@ public void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request,
* One request followed by one response.
*
*/
- public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
+ default void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver);
}
@@ -338,7 +338,7 @@ public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request
* satisfy subsequent requests.
*
*/
- public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
+ default void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCacheableUnaryCallMethod(), responseObserver);
}
@@ -349,7 +349,7 @@ public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleReques
* The server returns the payload with client desired type and sizes.
*
*/
- public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
+ default void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStreamingOutputCallMethod(), responseObserver);
}
@@ -360,7 +360,7 @@ public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOu
* The server returns the aggregated size of client payload as the result.
*
*/
- public io.grpc.stub.StreamObserver streamingInputCall(
+ default io.grpc.stub.StreamObserver streamingInputCall(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamingInputCallMethod(), responseObserver);
}
@@ -372,7 +372,7 @@ public io.grpc.stub.StreamObserver
*/
- public io.grpc.stub.StreamObserver fullDuplexCall(
+ default io.grpc.stub.StreamObserver fullDuplexCall(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getFullDuplexCallMethod(), responseObserver);
}
@@ -385,7 +385,7 @@ public io.grpc.stub.StreamObserver
*/
- public io.grpc.stub.StreamObserver halfDuplexCall(
+ default io.grpc.stub.StreamObserver halfDuplexCall(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getHalfDuplexCallMethod(), responseObserver);
}
@@ -396,80 +396,36 @@ public io.grpc.stub.StreamObserver
*/
- public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnimplementedCallMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service TestService.
+ *
+ * A simple service to test the various types of RPCs and experiment with
+ * performance with various types of payload.
+ *
+ */
+ public static abstract class TestServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getEmptyCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_EMPTY_CALL)))
- .addMethod(
- getUnaryCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.SimpleRequest,
- io.grpc.testing.integration.Messages.SimpleResponse>(
- this, METHODID_UNARY_CALL)))
- .addMethod(
- getCacheableUnaryCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.SimpleRequest,
- io.grpc.testing.integration.Messages.SimpleResponse>(
- this, METHODID_CACHEABLE_UNARY_CALL)))
- .addMethod(
- getStreamingOutputCallMethod(),
- io.grpc.stub.ServerCalls.asyncServerStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
- this, METHODID_STREAMING_OUTPUT_CALL)))
- .addMethod(
- getStreamingInputCallMethod(),
- io.grpc.stub.ServerCalls.asyncClientStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingInputCallRequest,
- io.grpc.testing.integration.Messages.StreamingInputCallResponse>(
- this, METHODID_STREAMING_INPUT_CALL)))
- .addMethod(
- getFullDuplexCallMethod(),
- io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
- this, METHODID_FULL_DUPLEX_CALL)))
- .addMethod(
- getHalfDuplexCallMethod(),
- io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
- this, METHODID_HALF_DUPLEX_CALL)))
- .addMethod(
- getUnimplementedCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_UNIMPLEMENTED_CALL)))
- .build();
+ return TestServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service TestService.
*
* A simple service to test the various types of RPCs and experiment with
* performance with various types of payload.
*
*/
- public static final class TestServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class TestServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private TestServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -581,12 +537,14 @@ public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty requ
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service TestService.
*
* A simple service to test the various types of RPCs and experiment with
* performance with various types of payload.
*
*/
- public static final class TestServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class TestServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private TestServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -655,12 +613,14 @@ public io.grpc.testing.integration.EmptyProtos.Empty unimplementedCall(io.grpc.t
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service TestService.
*
* A simple service to test the various types of RPCs and experiment with
* performance with various types of payload.
*
*/
- public static final class TestServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class TestServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private TestServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -734,10 +694,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final TestServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(TestServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -791,6 +751,67 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getEmptyCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_EMPTY_CALL)))
+ .addMethod(
+ getUnaryCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.SimpleRequest,
+ io.grpc.testing.integration.Messages.SimpleResponse>(
+ service, METHODID_UNARY_CALL)))
+ .addMethod(
+ getCacheableUnaryCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.SimpleRequest,
+ io.grpc.testing.integration.Messages.SimpleResponse>(
+ service, METHODID_CACHEABLE_UNARY_CALL)))
+ .addMethod(
+ getStreamingOutputCallMethod(),
+ io.grpc.stub.ServerCalls.asyncServerStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
+ io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
+ service, METHODID_STREAMING_OUTPUT_CALL)))
+ .addMethod(
+ getStreamingInputCallMethod(),
+ io.grpc.stub.ServerCalls.asyncClientStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.StreamingInputCallRequest,
+ io.grpc.testing.integration.Messages.StreamingInputCallResponse>(
+ service, METHODID_STREAMING_INPUT_CALL)))
+ .addMethod(
+ getFullDuplexCallMethod(),
+ io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
+ io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
+ service, METHODID_FULL_DUPLEX_CALL)))
+ .addMethod(
+ getHalfDuplexCallMethod(),
+ io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
+ io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
+ service, METHODID_HALF_DUPLEX_CALL)))
+ .addMethod(
+ getUnimplementedCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_UNIMPLEMENTED_CALL)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
index 77a8cd64ba8..2dc6495a6be 100644
--- a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
+++ b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
@@ -99,38 +99,43 @@ public UnimplementedServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.C
* that case.
*
*/
- public static abstract class UnimplementedServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
* A call that no server should implement
*
*/
- public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnimplementedCallMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service UnimplementedService.
+ *
+ * A simple service NOT implemented at servers so clients can test for
+ * that case.
+ *
+ */
+ public static abstract class UnimplementedServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getUnimplementedCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_UNIMPLEMENTED_CALL)))
- .build();
+ return UnimplementedServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service UnimplementedService.
*
* A simple service NOT implemented at servers so clients can test for
* that case.
*
*/
- public static final class UnimplementedServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class UnimplementedServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private UnimplementedServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -155,12 +160,14 @@ public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty requ
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service UnimplementedService.
*
* A simple service NOT implemented at servers so clients can test for
* that case.
*
*/
- public static final class UnimplementedServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class UnimplementedServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private UnimplementedServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -184,12 +191,14 @@ public io.grpc.testing.integration.EmptyProtos.Empty unimplementedCall(io.grpc.t
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service UnimplementedService.
*
* A simple service NOT implemented at servers so clients can test for
* that case.
*
*/
- public static final class UnimplementedServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class UnimplementedServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private UnimplementedServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -220,10 +229,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final UnimplementedServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(UnimplementedServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -252,6 +261,18 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getUnimplementedCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_UNIMPLEMENTED_CALL)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/XdsUpdateClientConfigureServiceGrpc.java b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/XdsUpdateClientConfigureServiceGrpc.java
index ea7b6e1064e..bb966dcbc73 100644
--- a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/XdsUpdateClientConfigureServiceGrpc.java
+++ b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/XdsUpdateClientConfigureServiceGrpc.java
@@ -97,37 +97,41 @@ public XdsUpdateClientConfigureServiceFutureStub newStub(io.grpc.Channel channel
* A service to dynamically update the configuration of an xDS test client.
*
*/
- public static abstract class XdsUpdateClientConfigureServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
* Update the tes client's configuration.
*
*/
- public void configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request,
+ default void configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfigureMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service XdsUpdateClientConfigureService.
+ *
+ * A service to dynamically update the configuration of an xDS test client.
+ *
+ */
+ public static abstract class XdsUpdateClientConfigureServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getConfigureMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.ClientConfigureRequest,
- io.grpc.testing.integration.Messages.ClientConfigureResponse>(
- this, METHODID_CONFIGURE)))
- .build();
+ return XdsUpdateClientConfigureServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service XdsUpdateClientConfigureService.
*
* A service to dynamically update the configuration of an xDS test client.
*
*/
- public static final class XdsUpdateClientConfigureServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class XdsUpdateClientConfigureServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private XdsUpdateClientConfigureServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -152,11 +156,13 @@ public void configure(io.grpc.testing.integration.Messages.ClientConfigureReques
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service XdsUpdateClientConfigureService.
*
* A service to dynamically update the configuration of an xDS test client.
*
*/
- public static final class XdsUpdateClientConfigureServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class XdsUpdateClientConfigureServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private XdsUpdateClientConfigureServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -180,11 +186,13 @@ public io.grpc.testing.integration.Messages.ClientConfigureResponse configure(io
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service XdsUpdateClientConfigureService.
*
* A service to dynamically update the configuration of an xDS test client.
*
*/
- public static final class XdsUpdateClientConfigureServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class XdsUpdateClientConfigureServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private XdsUpdateClientConfigureServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -215,10 +223,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final XdsUpdateClientConfigureServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(XdsUpdateClientConfigureServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -247,6 +255,18 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getConfigureMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.ClientConfigureRequest,
+ io.grpc.testing.integration.Messages.ClientConfigureResponse>(
+ service, METHODID_CONFIGURE)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/XdsUpdateHealthServiceGrpc.java b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/XdsUpdateHealthServiceGrpc.java
index 55458ce2a42..57bf5365034 100644
--- a/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/XdsUpdateHealthServiceGrpc.java
+++ b/android-interop-testing/src/generated/debug/grpc/io/grpc/testing/integration/XdsUpdateHealthServiceGrpc.java
@@ -127,48 +127,45 @@ public XdsUpdateHealthServiceFutureStub newStub(io.grpc.Channel channel, io.grpc
* A service to remotely control health status of an xDS test server.
*
*/
- public static abstract class XdsUpdateHealthServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*/
- public void setServing(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void setServing(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServingMethod(), responseObserver);
}
/**
*/
- public void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetNotServingMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service XdsUpdateHealthService.
+ *
+ * A service to remotely control health status of an xDS test server.
+ *
+ */
+ public static abstract class XdsUpdateHealthServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getSetServingMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_SET_SERVING)))
- .addMethod(
- getSetNotServingMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_SET_NOT_SERVING)))
- .build();
+ return XdsUpdateHealthServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service XdsUpdateHealthService.
*
* A service to remotely control health status of an xDS test server.
*
*/
- public static final class XdsUpdateHealthServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class XdsUpdateHealthServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private XdsUpdateHealthServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -198,11 +195,13 @@ public void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service XdsUpdateHealthService.
*
* A service to remotely control health status of an xDS test server.
*
*/
- public static final class XdsUpdateHealthServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class XdsUpdateHealthServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private XdsUpdateHealthServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -230,11 +229,13 @@ public io.grpc.testing.integration.EmptyProtos.Empty setNotServing(io.grpc.testi
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service XdsUpdateHealthService.
*
* A service to remotely control health status of an xDS test server.
*
*/
- public static final class XdsUpdateHealthServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class XdsUpdateHealthServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private XdsUpdateHealthServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -271,10 +272,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final XdsUpdateHealthServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(XdsUpdateHealthServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -307,6 +308,25 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getSetServingMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_SET_SERVING)))
+ .addMethod(
+ getSetNotServingMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_SET_NOT_SERVING)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java
index cd2bf958508..24c8d6189cc 100644
--- a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java
+++ b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/LoadBalancerStatsServiceGrpc.java
@@ -127,14 +127,14 @@ public LoadBalancerStatsServiceFutureStub newStub(io.grpc.Channel channel, io.gr
* A service used to obtain stats for verifying LB behavior.
*
*/
- public static abstract class LoadBalancerStatsServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
* Gets the backend distribution for RPCs sent by a test client.
*
*/
- public void getClientStats(io.grpc.testing.integration.Messages.LoadBalancerStatsRequest request,
+ default void getClientStats(io.grpc.testing.integration.Messages.LoadBalancerStatsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClientStatsMethod(), responseObserver);
}
@@ -144,37 +144,34 @@ public void getClientStats(io.grpc.testing.integration.Messages.LoadBalancerStat
* Gets the accumulated stats for RPCs sent by a test client.
*
*/
- public void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request,
+ default void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClientAccumulatedStatsMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service LoadBalancerStatsService.
+ *
+ * A service used to obtain stats for verifying LB behavior.
+ *
+ */
+ public static abstract class LoadBalancerStatsServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getGetClientStatsMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.LoadBalancerStatsRequest,
- io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>(
- this, METHODID_GET_CLIENT_STATS)))
- .addMethod(
- getGetClientAccumulatedStatsMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
- io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>(
- this, METHODID_GET_CLIENT_ACCUMULATED_STATS)))
- .build();
+ return LoadBalancerStatsServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service LoadBalancerStatsService.
*
* A service used to obtain stats for verifying LB behavior.
*
*/
- public static final class LoadBalancerStatsServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class LoadBalancerStatsServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private LoadBalancerStatsServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -210,11 +207,13 @@ public void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadB
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service LoadBalancerStatsService.
*
* A service used to obtain stats for verifying LB behavior.
*
*/
- public static final class LoadBalancerStatsServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class LoadBalancerStatsServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private LoadBalancerStatsServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -248,11 +247,13 @@ public io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service LoadBalancerStatsService.
*
* A service used to obtain stats for verifying LB behavior.
*
*/
- public static final class LoadBalancerStatsServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class LoadBalancerStatsServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private LoadBalancerStatsServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -295,10 +296,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final LoadBalancerStatsServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(LoadBalancerStatsServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -331,6 +332,25 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getGetClientStatsMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.LoadBalancerStatsRequest,
+ io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>(
+ service, METHODID_GET_CLIENT_STATS)))
+ .addMethod(
+ getGetClientAccumulatedStatsMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
+ io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>(
+ service, METHODID_GET_CLIENT_ACCUMULATED_STATS)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java
index e3e9bc1dc35..0fc49afb5ea 100644
--- a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java
+++ b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java
@@ -121,7 +121,7 @@ public MetricsServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOpt
/**
*/
- public static abstract class MetricsServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
@@ -129,7 +129,7 @@ public static abstract class MetricsServiceImplBase implements io.grpc.BindableS
* the service
*
*/
- public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request,
+ default void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAllGaugesMethod(), responseObserver);
}
@@ -139,34 +139,28 @@ public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage reques
* Returns the value of one gauge
*
*/
- public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request,
+ default void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGaugeMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service MetricsService.
+ */
+ public static abstract class MetricsServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getGetAllGaugesMethod(),
- io.grpc.stub.ServerCalls.asyncServerStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Metrics.EmptyMessage,
- io.grpc.testing.integration.Metrics.GaugeResponse>(
- this, METHODID_GET_ALL_GAUGES)))
- .addMethod(
- getGetGaugeMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Metrics.GaugeRequest,
- io.grpc.testing.integration.Metrics.GaugeResponse>(
- this, METHODID_GET_GAUGE)))
- .build();
+ return MetricsServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service MetricsService.
*/
- public static final class MetricsServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class MetricsServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private MetricsServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -203,8 +197,10 @@ public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request,
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service MetricsService.
*/
- public static final class MetricsServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class MetricsServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private MetricsServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -240,8 +236,10 @@ public io.grpc.testing.integration.Metrics.GaugeResponse getGauge(io.grpc.testin
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service MetricsService.
*/
- public static final class MetricsServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class MetricsServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private MetricsServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -273,10 +271,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final MetricsServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(MetricsServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -309,6 +307,25 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getGetAllGaugesMethod(),
+ io.grpc.stub.ServerCalls.asyncServerStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Metrics.EmptyMessage,
+ io.grpc.testing.integration.Metrics.GaugeResponse>(
+ service, METHODID_GET_ALL_GAUGES)))
+ .addMethod(
+ getGetGaugeMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Metrics.GaugeRequest,
+ io.grpc.testing.integration.Metrics.GaugeResponse>(
+ service, METHODID_GET_GAUGE)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
index 476e9cc03a1..93f97349e83 100644
--- a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
+++ b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
@@ -127,48 +127,45 @@ public ReconnectServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallO
* A service used to control reconnect server.
*
*/
- public static abstract class ReconnectServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*/
- public void start(io.grpc.testing.integration.Messages.ReconnectParams request,
+ default void start(io.grpc.testing.integration.Messages.ReconnectParams request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartMethod(), responseObserver);
}
/**
*/
- public void stop(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void stop(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service ReconnectService.
+ *
+ * A service used to control reconnect server.
+ *
+ */
+ public static abstract class ReconnectServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getStartMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.ReconnectParams,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_START)))
- .addMethod(
- getStopMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.Messages.ReconnectInfo>(
- this, METHODID_STOP)))
- .build();
+ return ReconnectServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service ReconnectService.
*
* A service used to control reconnect server.
*
*/
- public static final class ReconnectServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class ReconnectServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private ReconnectServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -198,11 +195,13 @@ public void stop(io.grpc.testing.integration.EmptyProtos.Empty request,
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service ReconnectService.
*
* A service used to control reconnect server.
*
*/
- public static final class ReconnectServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class ReconnectServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private ReconnectServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -230,11 +229,13 @@ public io.grpc.testing.integration.Messages.ReconnectInfo stop(io.grpc.testing.i
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service ReconnectService.
*
* A service used to control reconnect server.
*
*/
- public static final class ReconnectServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class ReconnectServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private ReconnectServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -271,10 +272,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final ReconnectServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(ReconnectServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -307,6 +308,25 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getStartMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.ReconnectParams,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_START)))
+ .addMethod(
+ getStopMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.Messages.ReconnectInfo>(
+ service, METHODID_STOP)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/TestServiceGrpc.java b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/TestServiceGrpc.java
index 3569dbc5292..8b9c3c899fd 100644
--- a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/TestServiceGrpc.java
+++ b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/TestServiceGrpc.java
@@ -309,14 +309,14 @@ public TestServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOption
* performance with various types of payload.
*
*/
- public static abstract class TestServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
* One empty request followed by one empty response.
*
*/
- public void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEmptyCallMethod(), responseObserver);
}
@@ -326,7 +326,7 @@ public void emptyCall(io.grpc.testing.integration.EmptyProtos.Empty request,
* One request followed by one response.
*
*/
- public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
+ default void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver);
}
@@ -338,7 +338,7 @@ public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request
* satisfy subsequent requests.
*
*/
- public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
+ default void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCacheableUnaryCallMethod(), responseObserver);
}
@@ -349,7 +349,7 @@ public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleReques
* The server returns the payload with client desired type and sizes.
*
*/
- public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
+ default void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStreamingOutputCallMethod(), responseObserver);
}
@@ -360,7 +360,7 @@ public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOu
* The server returns the aggregated size of client payload as the result.
*
*/
- public io.grpc.stub.StreamObserver streamingInputCall(
+ default io.grpc.stub.StreamObserver streamingInputCall(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamingInputCallMethod(), responseObserver);
}
@@ -372,7 +372,7 @@ public io.grpc.stub.StreamObserver
*/
- public io.grpc.stub.StreamObserver fullDuplexCall(
+ default io.grpc.stub.StreamObserver fullDuplexCall(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getFullDuplexCallMethod(), responseObserver);
}
@@ -385,7 +385,7 @@ public io.grpc.stub.StreamObserver
*/
- public io.grpc.stub.StreamObserver halfDuplexCall(
+ default io.grpc.stub.StreamObserver halfDuplexCall(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getHalfDuplexCallMethod(), responseObserver);
}
@@ -396,80 +396,36 @@ public io.grpc.stub.StreamObserver
*/
- public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnimplementedCallMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service TestService.
+ *
+ * A simple service to test the various types of RPCs and experiment with
+ * performance with various types of payload.
+ *
+ */
+ public static abstract class TestServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getEmptyCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_EMPTY_CALL)))
- .addMethod(
- getUnaryCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.SimpleRequest,
- io.grpc.testing.integration.Messages.SimpleResponse>(
- this, METHODID_UNARY_CALL)))
- .addMethod(
- getCacheableUnaryCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.SimpleRequest,
- io.grpc.testing.integration.Messages.SimpleResponse>(
- this, METHODID_CACHEABLE_UNARY_CALL)))
- .addMethod(
- getStreamingOutputCallMethod(),
- io.grpc.stub.ServerCalls.asyncServerStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
- this, METHODID_STREAMING_OUTPUT_CALL)))
- .addMethod(
- getStreamingInputCallMethod(),
- io.grpc.stub.ServerCalls.asyncClientStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingInputCallRequest,
- io.grpc.testing.integration.Messages.StreamingInputCallResponse>(
- this, METHODID_STREAMING_INPUT_CALL)))
- .addMethod(
- getFullDuplexCallMethod(),
- io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
- this, METHODID_FULL_DUPLEX_CALL)))
- .addMethod(
- getHalfDuplexCallMethod(),
- io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
- this, METHODID_HALF_DUPLEX_CALL)))
- .addMethod(
- getUnimplementedCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_UNIMPLEMENTED_CALL)))
- .build();
+ return TestServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service TestService.
*
* A simple service to test the various types of RPCs and experiment with
* performance with various types of payload.
*
*/
- public static final class TestServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class TestServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private TestServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -581,12 +537,14 @@ public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty requ
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service TestService.
*
* A simple service to test the various types of RPCs and experiment with
* performance with various types of payload.
*
*/
- public static final class TestServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class TestServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private TestServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -655,12 +613,14 @@ public io.grpc.testing.integration.EmptyProtos.Empty unimplementedCall(io.grpc.t
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service TestService.
*
* A simple service to test the various types of RPCs and experiment with
* performance with various types of payload.
*
*/
- public static final class TestServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class TestServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private TestServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -734,10 +694,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final TestServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(TestServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -791,6 +751,67 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getEmptyCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_EMPTY_CALL)))
+ .addMethod(
+ getUnaryCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.SimpleRequest,
+ io.grpc.testing.integration.Messages.SimpleResponse>(
+ service, METHODID_UNARY_CALL)))
+ .addMethod(
+ getCacheableUnaryCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.SimpleRequest,
+ io.grpc.testing.integration.Messages.SimpleResponse>(
+ service, METHODID_CACHEABLE_UNARY_CALL)))
+ .addMethod(
+ getStreamingOutputCallMethod(),
+ io.grpc.stub.ServerCalls.asyncServerStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
+ io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
+ service, METHODID_STREAMING_OUTPUT_CALL)))
+ .addMethod(
+ getStreamingInputCallMethod(),
+ io.grpc.stub.ServerCalls.asyncClientStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.StreamingInputCallRequest,
+ io.grpc.testing.integration.Messages.StreamingInputCallResponse>(
+ service, METHODID_STREAMING_INPUT_CALL)))
+ .addMethod(
+ getFullDuplexCallMethod(),
+ io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
+ io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
+ service, METHODID_FULL_DUPLEX_CALL)))
+ .addMethod(
+ getHalfDuplexCallMethod(),
+ io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
+ io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
+ service, METHODID_HALF_DUPLEX_CALL)))
+ .addMethod(
+ getUnimplementedCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_UNIMPLEMENTED_CALL)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
index 77a8cd64ba8..2dc6495a6be 100644
--- a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
+++ b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
@@ -99,38 +99,43 @@ public UnimplementedServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.C
* that case.
*
*/
- public static abstract class UnimplementedServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
* A call that no server should implement
*
*/
- public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnimplementedCallMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service UnimplementedService.
+ *
+ * A simple service NOT implemented at servers so clients can test for
+ * that case.
+ *
+ */
+ public static abstract class UnimplementedServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getUnimplementedCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_UNIMPLEMENTED_CALL)))
- .build();
+ return UnimplementedServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service UnimplementedService.
*
* A simple service NOT implemented at servers so clients can test for
* that case.
*
*/
- public static final class UnimplementedServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class UnimplementedServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private UnimplementedServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -155,12 +160,14 @@ public void unimplementedCall(io.grpc.testing.integration.EmptyProtos.Empty requ
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service UnimplementedService.
*
* A simple service NOT implemented at servers so clients can test for
* that case.
*
*/
- public static final class UnimplementedServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class UnimplementedServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private UnimplementedServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -184,12 +191,14 @@ public io.grpc.testing.integration.EmptyProtos.Empty unimplementedCall(io.grpc.t
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service UnimplementedService.
*
* A simple service NOT implemented at servers so clients can test for
* that case.
*
*/
- public static final class UnimplementedServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class UnimplementedServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private UnimplementedServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -220,10 +229,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final UnimplementedServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(UnimplementedServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -252,6 +261,18 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getUnimplementedCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_UNIMPLEMENTED_CALL)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/XdsUpdateClientConfigureServiceGrpc.java b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/XdsUpdateClientConfigureServiceGrpc.java
index ea7b6e1064e..bb966dcbc73 100644
--- a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/XdsUpdateClientConfigureServiceGrpc.java
+++ b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/XdsUpdateClientConfigureServiceGrpc.java
@@ -97,37 +97,41 @@ public XdsUpdateClientConfigureServiceFutureStub newStub(io.grpc.Channel channel
* A service to dynamically update the configuration of an xDS test client.
*
*/
- public static abstract class XdsUpdateClientConfigureServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
* Update the tes client's configuration.
*
*/
- public void configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request,
+ default void configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfigureMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service XdsUpdateClientConfigureService.
+ *
+ * A service to dynamically update the configuration of an xDS test client.
+ *
+ */
+ public static abstract class XdsUpdateClientConfigureServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getConfigureMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.ClientConfigureRequest,
- io.grpc.testing.integration.Messages.ClientConfigureResponse>(
- this, METHODID_CONFIGURE)))
- .build();
+ return XdsUpdateClientConfigureServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service XdsUpdateClientConfigureService.
*
* A service to dynamically update the configuration of an xDS test client.
*
*/
- public static final class XdsUpdateClientConfigureServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class XdsUpdateClientConfigureServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private XdsUpdateClientConfigureServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -152,11 +156,13 @@ public void configure(io.grpc.testing.integration.Messages.ClientConfigureReques
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service XdsUpdateClientConfigureService.
*
* A service to dynamically update the configuration of an xDS test client.
*
*/
- public static final class XdsUpdateClientConfigureServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class XdsUpdateClientConfigureServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private XdsUpdateClientConfigureServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -180,11 +186,13 @@ public io.grpc.testing.integration.Messages.ClientConfigureResponse configure(io
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service XdsUpdateClientConfigureService.
*
* A service to dynamically update the configuration of an xDS test client.
*
*/
- public static final class XdsUpdateClientConfigureServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class XdsUpdateClientConfigureServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private XdsUpdateClientConfigureServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -215,10 +223,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final XdsUpdateClientConfigureServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(XdsUpdateClientConfigureServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -247,6 +255,18 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getConfigureMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.Messages.ClientConfigureRequest,
+ io.grpc.testing.integration.Messages.ClientConfigureResponse>(
+ service, METHODID_CONFIGURE)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
diff --git a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/XdsUpdateHealthServiceGrpc.java b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/XdsUpdateHealthServiceGrpc.java
index 55458ce2a42..57bf5365034 100644
--- a/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/XdsUpdateHealthServiceGrpc.java
+++ b/android-interop-testing/src/generated/release/grpc/io/grpc/testing/integration/XdsUpdateHealthServiceGrpc.java
@@ -127,48 +127,45 @@ public XdsUpdateHealthServiceFutureStub newStub(io.grpc.Channel channel, io.grpc
* A service to remotely control health status of an xDS test server.
*
*/
- public static abstract class XdsUpdateHealthServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*/
- public void setServing(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void setServing(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServingMethod(), responseObserver);
}
/**
*/
- public void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
+ default void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetNotServingMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service XdsUpdateHealthService.
+ *
+ * A service to remotely control health status of an xDS test server.
+ *
+ */
+ public static abstract class XdsUpdateHealthServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getSetServingMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_SET_SERVING)))
- .addMethod(
- getSetNotServingMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.EmptyProtos.Empty,
- io.grpc.testing.integration.EmptyProtos.Empty>(
- this, METHODID_SET_NOT_SERVING)))
- .build();
+ return XdsUpdateHealthServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service XdsUpdateHealthService.
*
* A service to remotely control health status of an xDS test server.
*
*/
- public static final class XdsUpdateHealthServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class XdsUpdateHealthServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private XdsUpdateHealthServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -198,11 +195,13 @@ public void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service XdsUpdateHealthService.
*
* A service to remotely control health status of an xDS test server.
*
*/
- public static final class XdsUpdateHealthServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
+ public static final class XdsUpdateHealthServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private XdsUpdateHealthServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -230,11 +229,13 @@ public io.grpc.testing.integration.EmptyProtos.Empty setNotServing(io.grpc.testi
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service XdsUpdateHealthService.
*
* A service to remotely control health status of an xDS test server.
*
*/
- public static final class XdsUpdateHealthServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class XdsUpdateHealthServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private XdsUpdateHealthServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -271,10 +272,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final XdsUpdateHealthServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(XdsUpdateHealthServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -307,6 +308,25 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getSetServingMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_SET_SERVING)))
+ .addMethod(
+ getSetNotServingMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.integration.EmptyProtos.Empty,
+ io.grpc.testing.integration.EmptyProtos.Empty>(
+ service, METHODID_SET_NOT_SERVING)))
+ .build();
+ }
+
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
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 c9a0f385ab6..6fd21f2c037 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
@@ -216,7 +216,7 @@ public BenchmarkServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallO
/**
*/
- public static abstract class BenchmarkServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
@@ -224,7 +224,7 @@ public static abstract class BenchmarkServiceImplBase implements io.grpc.Bindabl
* The server returns the client payload as-is.
*
*/
- public void unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request,
+ default void unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnaryCallMethod(), responseObserver);
}
@@ -236,7 +236,7 @@ public void unaryCall(io.grpc.benchmarks.proto.Messages.SimpleRequest request,
* The server returns the client payload as-is on each response
*
*/
- public io.grpc.stub.StreamObserver streamingCall(
+ default io.grpc.stub.StreamObserver streamingCall(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamingCallMethod(), responseObserver);
}
@@ -247,7 +247,7 @@ public io.grpc.stub.StreamObserver
*/
- public io.grpc.stub.StreamObserver streamingFromClient(
+ default io.grpc.stub.StreamObserver streamingFromClient(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamingFromClientMethod(), responseObserver);
}
@@ -258,7 +258,7 @@ public io.grpc.stub.StreamObserver
*/
- public void streamingFromServer(io.grpc.benchmarks.proto.Messages.SimpleRequest request,
+ default void streamingFromServer(io.grpc.benchmarks.proto.Messages.SimpleRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStreamingFromServerMethod(), responseObserver);
}
@@ -269,55 +269,28 @@ public void streamingFromServer(io.grpc.benchmarks.proto.Messages.SimpleRequest
* Both sides send the content of their own choice to the other
*
*/
- public io.grpc.stub.StreamObserver streamingBothWays(
+ default io.grpc.stub.StreamObserver streamingBothWays(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamingBothWaysMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service BenchmarkService.
+ */
+ public static abstract class BenchmarkServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getUnaryCallMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.benchmarks.proto.Messages.SimpleRequest,
- io.grpc.benchmarks.proto.Messages.SimpleResponse>(
- this, METHODID_UNARY_CALL)))
- .addMethod(
- getStreamingCallMethod(),
- io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
- new MethodHandlers<
- io.grpc.benchmarks.proto.Messages.SimpleRequest,
- io.grpc.benchmarks.proto.Messages.SimpleResponse>(
- this, METHODID_STREAMING_CALL)))
- .addMethod(
- getStreamingFromClientMethod(),
- io.grpc.stub.ServerCalls.asyncClientStreamingCall(
- new MethodHandlers<
- io.grpc.benchmarks.proto.Messages.SimpleRequest,
- io.grpc.benchmarks.proto.Messages.SimpleResponse>(
- this, METHODID_STREAMING_FROM_CLIENT)))
- .addMethod(
- getStreamingFromServerMethod(),
- io.grpc.stub.ServerCalls.asyncServerStreamingCall(
- new MethodHandlers<
- io.grpc.benchmarks.proto.Messages.SimpleRequest,
- io.grpc.benchmarks.proto.Messages.SimpleResponse>(
- this, METHODID_STREAMING_FROM_SERVER)))
- .addMethod(
- getStreamingBothWaysMethod(),
- io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
- new MethodHandlers<
- io.grpc.benchmarks.proto.Messages.SimpleRequest,
- io.grpc.benchmarks.proto.Messages.SimpleResponse>(
- this, METHODID_STREAMING_BOTH_WAYS)))
- .build();
+ return BenchmarkServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service BenchmarkService.
*/
- public static final class BenchmarkServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class BenchmarkServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private BenchmarkServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -392,8 +365,10 @@ public io.grpc.stub.StreamObserver {
+ public static final class BenchmarkServiceBlockingStub
+ extends io.grpc.stub.AbstractBlockingStub {
private BenchmarkServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -430,8 +405,10 @@ public java.util.Iterator stre
}
/**
+ * A stub to allow clients to do ListenableFuture-style rpc calls to service BenchmarkService.
*/
- public static final class BenchmarkServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
+ public static final class BenchmarkServiceFutureStub
+ extends io.grpc.stub.AbstractFutureStub {
private BenchmarkServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -467,10 +444,10 @@ private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
- private final BenchmarkServiceImplBase serviceImpl;
+ private final AsyncService serviceImpl;
private final int methodId;
- MethodHandlers(BenchmarkServiceImplBase serviceImpl, int methodId) {
+ MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@@ -512,6 +489,46 @@ public io.grpc.stub.StreamObserver invoke(
}
}
+ public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ getUnaryCallMethod(),
+ io.grpc.stub.ServerCalls.asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.benchmarks.proto.Messages.SimpleRequest,
+ io.grpc.benchmarks.proto.Messages.SimpleResponse>(
+ service, METHODID_UNARY_CALL)))
+ .addMethod(
+ getStreamingCallMethod(),
+ io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
+ new MethodHandlers<
+ io.grpc.benchmarks.proto.Messages.SimpleRequest,
+ io.grpc.benchmarks.proto.Messages.SimpleResponse>(
+ service, METHODID_STREAMING_CALL)))
+ .addMethod(
+ getStreamingFromClientMethod(),
+ io.grpc.stub.ServerCalls.asyncClientStreamingCall(
+ new MethodHandlers<
+ io.grpc.benchmarks.proto.Messages.SimpleRequest,
+ io.grpc.benchmarks.proto.Messages.SimpleResponse>(
+ service, METHODID_STREAMING_FROM_CLIENT)))
+ .addMethod(
+ getStreamingFromServerMethod(),
+ io.grpc.stub.ServerCalls.asyncServerStreamingCall(
+ new MethodHandlers<
+ io.grpc.benchmarks.proto.Messages.SimpleRequest,
+ io.grpc.benchmarks.proto.Messages.SimpleResponse>(
+ service, METHODID_STREAMING_FROM_SERVER)))
+ .addMethod(
+ getStreamingBothWaysMethod(),
+ io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
+ new MethodHandlers<
+ io.grpc.benchmarks.proto.Messages.SimpleRequest,
+ io.grpc.benchmarks.proto.Messages.SimpleResponse>(
+ service, METHODID_STREAMING_BOTH_WAYS)))
+ .build();
+ }
+
private static abstract class BenchmarkServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
BenchmarkServiceBaseDescriptorSupplier() {}
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 497d504b152..534ba40ed77 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
@@ -92,34 +92,35 @@ public ReportQpsScenarioServiceFutureStub newStub(io.grpc.Channel channel, io.gr
/**
*/
- public static abstract class ReportQpsScenarioServiceImplBase implements io.grpc.BindableService {
+ public interface AsyncService {
/**
*
* Report results of a QPS test benchmark scenario.
*
*/
- public void reportScenario(io.grpc.benchmarks.proto.Control.ScenarioResult request,
+ default void reportScenario(io.grpc.benchmarks.proto.Control.ScenarioResult request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReportScenarioMethod(), responseObserver);
}
+ }
+
+ /**
+ * Base class for the server implementation of the service ReportQpsScenarioService.
+ */
+ public static abstract class ReportQpsScenarioServiceImplBase
+ implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- getReportScenarioMethod(),
- io.grpc.stub.ServerCalls.asyncUnaryCall(
- new MethodHandlers<
- io.grpc.benchmarks.proto.Control.ScenarioResult,
- io.grpc.benchmarks.proto.Control.Void>(
- this, METHODID_REPORT_SCENARIO)))
- .build();
+ return ReportQpsScenarioServiceGrpc.bindService(this);
}
}
/**
+ * A stub to allow clients to do asynchronous rpc calls to service ReportQpsScenarioService.
*/
- public static final class ReportQpsScenarioServiceStub extends io.grpc.stub.AbstractAsyncStub {
+ public static final class ReportQpsScenarioServiceStub
+ extends io.grpc.stub.AbstractAsyncStub {
private ReportQpsScenarioServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
@@ -144,8 +145,10 @@ public void reportScenario(io.grpc.benchmarks.proto.Control.ScenarioResult reque
}
/**
+ * A stub to allow clients to do synchronous rpc calls to service ReportQpsScenarioService.
*/
- public static final class ReportQpsScenarioServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub