mirror of https://github.com/grpc/grpc-java.git
interop-testing: update proto generated service files (#7682)
This commit is contained in:
parent
a6c3df2f24
commit
05048cf3e2
|
|
@ -60,6 +60,36 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
return getGetClientStatsMethod;
|
return getGetClientStatsMethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> getGetClientAccumulatedStatsMethod;
|
||||||
|
|
||||||
|
@io.grpc.stub.annotations.RpcMethod(
|
||||||
|
fullMethodName = SERVICE_NAME + '/' + "GetClientAccumulatedStats",
|
||||||
|
requestType = io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest.class,
|
||||||
|
responseType = io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse.class,
|
||||||
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> getGetClientAccumulatedStatsMethod() {
|
||||||
|
io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest, io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> getGetClientAccumulatedStatsMethod;
|
||||||
|
if ((getGetClientAccumulatedStatsMethod = LoadBalancerStatsServiceGrpc.getGetClientAccumulatedStatsMethod) == null) {
|
||||||
|
synchronized (LoadBalancerStatsServiceGrpc.class) {
|
||||||
|
if ((getGetClientAccumulatedStatsMethod = LoadBalancerStatsServiceGrpc.getGetClientAccumulatedStatsMethod) == null) {
|
||||||
|
LoadBalancerStatsServiceGrpc.getGetClientAccumulatedStatsMethod = getGetClientAccumulatedStatsMethod =
|
||||||
|
io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest, io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>newBuilder()
|
||||||
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetClientAccumulatedStats"))
|
||||||
|
.setSampledToLocalTracing(true)
|
||||||
|
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest.getDefaultInstance()))
|
||||||
|
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse.getDefaultInstance()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getGetClientAccumulatedStatsMethod;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new async stub that supports all call types for the service
|
* Creates a new async stub that supports all call types for the service
|
||||||
*/
|
*/
|
||||||
|
|
@ -121,6 +151,16 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
asyncUnimplementedUnaryCall(getGetClientStatsMethod(), responseObserver);
|
asyncUnimplementedUnaryCall(getGetClientStatsMethod(), responseObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Gets the accumulated stats for RPCs sent by a test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> responseObserver) {
|
||||||
|
asyncUnimplementedUnaryCall(getGetClientAccumulatedStatsMethod(), responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
||||||
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||||
.addMethod(
|
.addMethod(
|
||||||
|
|
@ -130,6 +170,13 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
io.grpc.testing.integration.Messages.LoadBalancerStatsRequest,
|
io.grpc.testing.integration.Messages.LoadBalancerStatsRequest,
|
||||||
io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>(
|
io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>(
|
||||||
this, METHODID_GET_CLIENT_STATS)))
|
this, METHODID_GET_CLIENT_STATS)))
|
||||||
|
.addMethod(
|
||||||
|
getGetClientAccumulatedStatsMethod(),
|
||||||
|
asyncUnaryCall(
|
||||||
|
new MethodHandlers<
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>(
|
||||||
|
this, METHODID_GET_CLIENT_ACCUMULATED_STATS)))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -161,6 +208,17 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
asyncUnaryCall(
|
asyncUnaryCall(
|
||||||
getChannel().newCall(getGetClientStatsMethod(), getCallOptions()), request, responseObserver);
|
getChannel().newCall(getGetClientStatsMethod(), getCallOptions()), request, responseObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Gets the accumulated stats for RPCs sent by a test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> responseObserver) {
|
||||||
|
asyncUnaryCall(
|
||||||
|
getChannel().newCall(getGetClientAccumulatedStatsMethod(), getCallOptions()), request, responseObserver);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -189,6 +247,16 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
return blockingUnaryCall(
|
return blockingUnaryCall(
|
||||||
getChannel(), getGetClientStatsMethod(), getCallOptions(), request);
|
getChannel(), getGetClientStatsMethod(), getCallOptions(), request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Gets the accumulated stats for RPCs sent by a test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request) {
|
||||||
|
return blockingUnaryCall(
|
||||||
|
getChannel(), getGetClientAccumulatedStatsMethod(), getCallOptions(), request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -218,9 +286,21 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
return futureUnaryCall(
|
return futureUnaryCall(
|
||||||
getChannel().newCall(getGetClientStatsMethod(), getCallOptions()), request);
|
getChannel().newCall(getGetClientStatsMethod(), getCallOptions()), request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Gets the accumulated stats for RPCs sent by a test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> getClientAccumulatedStats(
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request) {
|
||||||
|
return futureUnaryCall(
|
||||||
|
getChannel().newCall(getGetClientAccumulatedStatsMethod(), getCallOptions()), request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int METHODID_GET_CLIENT_STATS = 0;
|
private static final int METHODID_GET_CLIENT_STATS = 0;
|
||||||
|
private static final int METHODID_GET_CLIENT_ACCUMULATED_STATS = 1;
|
||||||
|
|
||||||
private static final class MethodHandlers<Req, Resp> implements
|
private static final class MethodHandlers<Req, Resp> implements
|
||||||
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||||
|
|
@ -243,6 +323,10 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
serviceImpl.getClientStats((io.grpc.testing.integration.Messages.LoadBalancerStatsRequest) request,
|
serviceImpl.getClientStats((io.grpc.testing.integration.Messages.LoadBalancerStatsRequest) request,
|
||||||
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>) responseObserver);
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>) responseObserver);
|
||||||
break;
|
break;
|
||||||
|
case METHODID_GET_CLIENT_ACCUMULATED_STATS:
|
||||||
|
serviceImpl.getClientAccumulatedStats((io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest) request,
|
||||||
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>) responseObserver);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new AssertionError();
|
throw new AssertionError();
|
||||||
}
|
}
|
||||||
|
|
@ -269,6 +353,7 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||||||
.addMethod(getGetClientStatsMethod())
|
.addMethod(getGetClientStatsMethod())
|
||||||
|
.addMethod(getGetClientAccumulatedStatsMethod())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,278 @@
|
||||||
|
package io.grpc.testing.integration;
|
||||||
|
|
||||||
|
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.futureUnaryCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@javax.annotation.Generated(
|
||||||
|
value = "by gRPC proto compiler",
|
||||||
|
comments = "Source: grpc/testing/test.proto")
|
||||||
|
public final class XdsUpdateClientConfigureServiceGrpc {
|
||||||
|
|
||||||
|
private XdsUpdateClientConfigureServiceGrpc() {}
|
||||||
|
|
||||||
|
public static final String SERVICE_NAME = "grpc.testing.XdsUpdateClientConfigureService";
|
||||||
|
|
||||||
|
// Static method descriptors that strictly reflect the proto.
|
||||||
|
private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.ClientConfigureRequest,
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureResponse> getConfigureMethod;
|
||||||
|
|
||||||
|
@io.grpc.stub.annotations.RpcMethod(
|
||||||
|
fullMethodName = SERVICE_NAME + '/' + "Configure",
|
||||||
|
requestType = io.grpc.testing.integration.Messages.ClientConfigureRequest.class,
|
||||||
|
responseType = io.grpc.testing.integration.Messages.ClientConfigureResponse.class,
|
||||||
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.ClientConfigureRequest,
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureResponse> getConfigureMethod() {
|
||||||
|
io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.ClientConfigureRequest, io.grpc.testing.integration.Messages.ClientConfigureResponse> getConfigureMethod;
|
||||||
|
if ((getConfigureMethod = XdsUpdateClientConfigureServiceGrpc.getConfigureMethod) == null) {
|
||||||
|
synchronized (XdsUpdateClientConfigureServiceGrpc.class) {
|
||||||
|
if ((getConfigureMethod = XdsUpdateClientConfigureServiceGrpc.getConfigureMethod) == null) {
|
||||||
|
XdsUpdateClientConfigureServiceGrpc.getConfigureMethod = getConfigureMethod =
|
||||||
|
io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.ClientConfigureRequest, io.grpc.testing.integration.Messages.ClientConfigureResponse>newBuilder()
|
||||||
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Configure"))
|
||||||
|
.setSampledToLocalTracing(true)
|
||||||
|
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureRequest.getDefaultInstance()))
|
||||||
|
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureResponse.getDefaultInstance()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getConfigureMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new async stub that supports all call types for the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateClientConfigureServiceStub newStub(io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateClientConfigureServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateClientConfigureServiceStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateClientConfigureServiceBlockingStub newBlockingStub(
|
||||||
|
io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceBlockingStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceBlockingStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateClientConfigureServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceBlockingStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateClientConfigureServiceBlockingStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new ListenableFuture-style stub that supports unary calls on the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateClientConfigureServiceFutureStub newFutureStub(
|
||||||
|
io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceFutureStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceFutureStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateClientConfigureServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceFutureStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateClientConfigureServiceFutureStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static abstract class XdsUpdateClientConfigureServiceImplBase implements io.grpc.BindableService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Update the tes client's configuration.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public void configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.ClientConfigureResponse> responseObserver) {
|
||||||
|
asyncUnimplementedUnaryCall(getConfigureMethod(), responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
||||||
|
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||||
|
.addMethod(
|
||||||
|
getConfigureMethod(),
|
||||||
|
asyncUnaryCall(
|
||||||
|
new MethodHandlers<
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureRequest,
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureResponse>(
|
||||||
|
this, METHODID_CONFIGURE)))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateClientConfigureServiceStub extends io.grpc.stub.AbstractAsyncStub<XdsUpdateClientConfigureServiceStub> {
|
||||||
|
private XdsUpdateClientConfigureServiceStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateClientConfigureServiceStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Update the tes client's configuration.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public void configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.ClientConfigureResponse> responseObserver) {
|
||||||
|
asyncUnaryCall(
|
||||||
|
getChannel().newCall(getConfigureMethod(), getCallOptions()), request, responseObserver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateClientConfigureServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<XdsUpdateClientConfigureServiceBlockingStub> {
|
||||||
|
private XdsUpdateClientConfigureServiceBlockingStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateClientConfigureServiceBlockingStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceBlockingStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Update the tes client's configuration.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public io.grpc.testing.integration.Messages.ClientConfigureResponse configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request) {
|
||||||
|
return blockingUnaryCall(
|
||||||
|
getChannel(), getConfigureMethod(), getCallOptions(), request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateClientConfigureServiceFutureStub extends io.grpc.stub.AbstractFutureStub<XdsUpdateClientConfigureServiceFutureStub> {
|
||||||
|
private XdsUpdateClientConfigureServiceFutureStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateClientConfigureServiceFutureStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceFutureStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Update the tes client's configuration.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Messages.ClientConfigureResponse> configure(
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureRequest request) {
|
||||||
|
return futureUnaryCall(
|
||||||
|
getChannel().newCall(getConfigureMethod(), getCallOptions()), request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int METHODID_CONFIGURE = 0;
|
||||||
|
|
||||||
|
private static final class MethodHandlers<Req, Resp> implements
|
||||||
|
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||||
|
private final XdsUpdateClientConfigureServiceImplBase serviceImpl;
|
||||||
|
private final int methodId;
|
||||||
|
|
||||||
|
MethodHandlers(XdsUpdateClientConfigureServiceImplBase serviceImpl, int methodId) {
|
||||||
|
this.serviceImpl = serviceImpl;
|
||||||
|
this.methodId = methodId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@java.lang.SuppressWarnings("unchecked")
|
||||||
|
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||||
|
switch (methodId) {
|
||||||
|
case METHODID_CONFIGURE:
|
||||||
|
serviceImpl.configure((io.grpc.testing.integration.Messages.ClientConfigureRequest) request,
|
||||||
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.ClientConfigureResponse>) responseObserver);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@java.lang.SuppressWarnings("unchecked")
|
||||||
|
public io.grpc.stub.StreamObserver<Req> invoke(
|
||||||
|
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||||
|
switch (methodId) {
|
||||||
|
default:
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
|
||||||
|
|
||||||
|
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
|
||||||
|
io.grpc.ServiceDescriptor result = serviceDescriptor;
|
||||||
|
if (result == null) {
|
||||||
|
synchronized (XdsUpdateClientConfigureServiceGrpc.class) {
|
||||||
|
result = serviceDescriptor;
|
||||||
|
if (result == null) {
|
||||||
|
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||||||
|
.addMethod(getConfigureMethod())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,339 @@
|
||||||
|
package io.grpc.testing.integration;
|
||||||
|
|
||||||
|
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.futureUnaryCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@javax.annotation.Generated(
|
||||||
|
value = "by gRPC proto compiler",
|
||||||
|
comments = "Source: grpc/testing/test.proto")
|
||||||
|
public final class XdsUpdateHealthServiceGrpc {
|
||||||
|
|
||||||
|
private XdsUpdateHealthServiceGrpc() {}
|
||||||
|
|
||||||
|
public static final String SERVICE_NAME = "grpc.testing.XdsUpdateHealthService";
|
||||||
|
|
||||||
|
// Static method descriptors that strictly reflect the proto.
|
||||||
|
private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty> getSetServingMethod;
|
||||||
|
|
||||||
|
@io.grpc.stub.annotations.RpcMethod(
|
||||||
|
fullMethodName = SERVICE_NAME + '/' + "SetServing",
|
||||||
|
requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
|
||||||
|
responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
|
||||||
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
public static io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty> getSetServingMethod() {
|
||||||
|
io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty> getSetServingMethod;
|
||||||
|
if ((getSetServingMethod = XdsUpdateHealthServiceGrpc.getSetServingMethod) == null) {
|
||||||
|
synchronized (XdsUpdateHealthServiceGrpc.class) {
|
||||||
|
if ((getSetServingMethod = XdsUpdateHealthServiceGrpc.getSetServingMethod) == null) {
|
||||||
|
XdsUpdateHealthServiceGrpc.getSetServingMethod = getSetServingMethod =
|
||||||
|
io.grpc.MethodDescriptor.<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty>newBuilder()
|
||||||
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetServing"))
|
||||||
|
.setSampledToLocalTracing(true)
|
||||||
|
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
|
||||||
|
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getSetServingMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty> getSetNotServingMethod;
|
||||||
|
|
||||||
|
@io.grpc.stub.annotations.RpcMethod(
|
||||||
|
fullMethodName = SERVICE_NAME + '/' + "SetNotServing",
|
||||||
|
requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
|
||||||
|
responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
|
||||||
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
public static io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty> getSetNotServingMethod() {
|
||||||
|
io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty> getSetNotServingMethod;
|
||||||
|
if ((getSetNotServingMethod = XdsUpdateHealthServiceGrpc.getSetNotServingMethod) == null) {
|
||||||
|
synchronized (XdsUpdateHealthServiceGrpc.class) {
|
||||||
|
if ((getSetNotServingMethod = XdsUpdateHealthServiceGrpc.getSetNotServingMethod) == null) {
|
||||||
|
XdsUpdateHealthServiceGrpc.getSetNotServingMethod = getSetNotServingMethod =
|
||||||
|
io.grpc.MethodDescriptor.<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty>newBuilder()
|
||||||
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetNotServing"))
|
||||||
|
.setSampledToLocalTracing(true)
|
||||||
|
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
|
||||||
|
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getSetNotServingMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new async stub that supports all call types for the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateHealthServiceStub newStub(io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateHealthServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateHealthServiceStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateHealthServiceBlockingStub newBlockingStub(
|
||||||
|
io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceBlockingStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceBlockingStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateHealthServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceBlockingStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateHealthServiceBlockingStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new ListenableFuture-style stub that supports unary calls on the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateHealthServiceFutureStub newFutureStub(
|
||||||
|
io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceFutureStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceFutureStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateHealthServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceFutureStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateHealthServiceFutureStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static abstract class XdsUpdateHealthServiceImplBase implements io.grpc.BindableService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void setServing(io.grpc.testing.integration.EmptyProtos.Empty request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
|
||||||
|
asyncUnimplementedUnaryCall(getSetServingMethod(), responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
|
||||||
|
asyncUnimplementedUnaryCall(getSetNotServingMethod(), responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
||||||
|
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||||
|
.addMethod(
|
||||||
|
getSetServingMethod(),
|
||||||
|
asyncUnaryCall(
|
||||||
|
new MethodHandlers<
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty>(
|
||||||
|
this, METHODID_SET_SERVING)))
|
||||||
|
.addMethod(
|
||||||
|
getSetNotServingMethod(),
|
||||||
|
asyncUnaryCall(
|
||||||
|
new MethodHandlers<
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty>(
|
||||||
|
this, METHODID_SET_NOT_SERVING)))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateHealthServiceStub extends io.grpc.stub.AbstractAsyncStub<XdsUpdateHealthServiceStub> {
|
||||||
|
private XdsUpdateHealthServiceStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateHealthServiceStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void setServing(io.grpc.testing.integration.EmptyProtos.Empty request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
|
||||||
|
asyncUnaryCall(
|
||||||
|
getChannel().newCall(getSetServingMethod(), getCallOptions()), request, responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
|
||||||
|
asyncUnaryCall(
|
||||||
|
getChannel().newCall(getSetNotServingMethod(), getCallOptions()), request, responseObserver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateHealthServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<XdsUpdateHealthServiceBlockingStub> {
|
||||||
|
private XdsUpdateHealthServiceBlockingStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateHealthServiceBlockingStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceBlockingStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public io.grpc.testing.integration.EmptyProtos.Empty setServing(io.grpc.testing.integration.EmptyProtos.Empty request) {
|
||||||
|
return blockingUnaryCall(
|
||||||
|
getChannel(), getSetServingMethod(), getCallOptions(), request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public io.grpc.testing.integration.EmptyProtos.Empty setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request) {
|
||||||
|
return blockingUnaryCall(
|
||||||
|
getChannel(), getSetNotServingMethod(), getCallOptions(), request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateHealthServiceFutureStub extends io.grpc.stub.AbstractFutureStub<XdsUpdateHealthServiceFutureStub> {
|
||||||
|
private XdsUpdateHealthServiceFutureStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateHealthServiceFutureStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceFutureStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.EmptyProtos.Empty> setServing(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty request) {
|
||||||
|
return futureUnaryCall(
|
||||||
|
getChannel().newCall(getSetServingMethod(), getCallOptions()), request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.EmptyProtos.Empty> setNotServing(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty request) {
|
||||||
|
return futureUnaryCall(
|
||||||
|
getChannel().newCall(getSetNotServingMethod(), getCallOptions()), request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int METHODID_SET_SERVING = 0;
|
||||||
|
private static final int METHODID_SET_NOT_SERVING = 1;
|
||||||
|
|
||||||
|
private static final class MethodHandlers<Req, Resp> implements
|
||||||
|
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||||
|
private final XdsUpdateHealthServiceImplBase serviceImpl;
|
||||||
|
private final int methodId;
|
||||||
|
|
||||||
|
MethodHandlers(XdsUpdateHealthServiceImplBase serviceImpl, int methodId) {
|
||||||
|
this.serviceImpl = serviceImpl;
|
||||||
|
this.methodId = methodId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@java.lang.SuppressWarnings("unchecked")
|
||||||
|
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||||
|
switch (methodId) {
|
||||||
|
case METHODID_SET_SERVING:
|
||||||
|
serviceImpl.setServing((io.grpc.testing.integration.EmptyProtos.Empty) request,
|
||||||
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty>) responseObserver);
|
||||||
|
break;
|
||||||
|
case METHODID_SET_NOT_SERVING:
|
||||||
|
serviceImpl.setNotServing((io.grpc.testing.integration.EmptyProtos.Empty) request,
|
||||||
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty>) responseObserver);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@java.lang.SuppressWarnings("unchecked")
|
||||||
|
public io.grpc.stub.StreamObserver<Req> invoke(
|
||||||
|
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||||
|
switch (methodId) {
|
||||||
|
default:
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
|
||||||
|
|
||||||
|
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
|
||||||
|
io.grpc.ServiceDescriptor result = serviceDescriptor;
|
||||||
|
if (result == null) {
|
||||||
|
synchronized (XdsUpdateHealthServiceGrpc.class) {
|
||||||
|
result = serviceDescriptor;
|
||||||
|
if (result == null) {
|
||||||
|
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||||||
|
.addMethod(getSetServingMethod())
|
||||||
|
.addMethod(getSetNotServingMethod())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -60,6 +60,36 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
return getGetClientStatsMethod;
|
return getGetClientStatsMethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> getGetClientAccumulatedStatsMethod;
|
||||||
|
|
||||||
|
@io.grpc.stub.annotations.RpcMethod(
|
||||||
|
fullMethodName = SERVICE_NAME + '/' + "GetClientAccumulatedStats",
|
||||||
|
requestType = io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest.class,
|
||||||
|
responseType = io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse.class,
|
||||||
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> getGetClientAccumulatedStatsMethod() {
|
||||||
|
io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest, io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> getGetClientAccumulatedStatsMethod;
|
||||||
|
if ((getGetClientAccumulatedStatsMethod = LoadBalancerStatsServiceGrpc.getGetClientAccumulatedStatsMethod) == null) {
|
||||||
|
synchronized (LoadBalancerStatsServiceGrpc.class) {
|
||||||
|
if ((getGetClientAccumulatedStatsMethod = LoadBalancerStatsServiceGrpc.getGetClientAccumulatedStatsMethod) == null) {
|
||||||
|
LoadBalancerStatsServiceGrpc.getGetClientAccumulatedStatsMethod = getGetClientAccumulatedStatsMethod =
|
||||||
|
io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest, io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>newBuilder()
|
||||||
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetClientAccumulatedStats"))
|
||||||
|
.setSampledToLocalTracing(true)
|
||||||
|
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest.getDefaultInstance()))
|
||||||
|
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse.getDefaultInstance()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getGetClientAccumulatedStatsMethod;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new async stub that supports all call types for the service
|
* Creates a new async stub that supports all call types for the service
|
||||||
*/
|
*/
|
||||||
|
|
@ -121,6 +151,16 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
asyncUnimplementedUnaryCall(getGetClientStatsMethod(), responseObserver);
|
asyncUnimplementedUnaryCall(getGetClientStatsMethod(), responseObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Gets the accumulated stats for RPCs sent by a test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> responseObserver) {
|
||||||
|
asyncUnimplementedUnaryCall(getGetClientAccumulatedStatsMethod(), responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
||||||
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||||
.addMethod(
|
.addMethod(
|
||||||
|
|
@ -130,6 +170,13 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
io.grpc.testing.integration.Messages.LoadBalancerStatsRequest,
|
io.grpc.testing.integration.Messages.LoadBalancerStatsRequest,
|
||||||
io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>(
|
io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>(
|
||||||
this, METHODID_GET_CLIENT_STATS)))
|
this, METHODID_GET_CLIENT_STATS)))
|
||||||
|
.addMethod(
|
||||||
|
getGetClientAccumulatedStatsMethod(),
|
||||||
|
asyncUnaryCall(
|
||||||
|
new MethodHandlers<
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest,
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>(
|
||||||
|
this, METHODID_GET_CLIENT_ACCUMULATED_STATS)))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -161,6 +208,17 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
asyncUnaryCall(
|
asyncUnaryCall(
|
||||||
getChannel().newCall(getGetClientStatsMethod(), getCallOptions()), request, responseObserver);
|
getChannel().newCall(getGetClientStatsMethod(), getCallOptions()), request, responseObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Gets the accumulated stats for RPCs sent by a test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public void getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> responseObserver) {
|
||||||
|
asyncUnaryCall(
|
||||||
|
getChannel().newCall(getGetClientAccumulatedStatsMethod(), getCallOptions()), request, responseObserver);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -189,6 +247,16 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
return blockingUnaryCall(
|
return blockingUnaryCall(
|
||||||
getChannel(), getGetClientStatsMethod(), getCallOptions(), request);
|
getChannel(), getGetClientStatsMethod(), getCallOptions(), request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Gets the accumulated stats for RPCs sent by a test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse getClientAccumulatedStats(io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request) {
|
||||||
|
return blockingUnaryCall(
|
||||||
|
getChannel(), getGetClientAccumulatedStatsMethod(), getCallOptions(), request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -218,9 +286,21 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
return futureUnaryCall(
|
return futureUnaryCall(
|
||||||
getChannel().newCall(getGetClientStatsMethod(), getCallOptions()), request);
|
getChannel().newCall(getGetClientStatsMethod(), getCallOptions()), request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Gets the accumulated stats for RPCs sent by a test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse> getClientAccumulatedStats(
|
||||||
|
io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest request) {
|
||||||
|
return futureUnaryCall(
|
||||||
|
getChannel().newCall(getGetClientAccumulatedStatsMethod(), getCallOptions()), request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int METHODID_GET_CLIENT_STATS = 0;
|
private static final int METHODID_GET_CLIENT_STATS = 0;
|
||||||
|
private static final int METHODID_GET_CLIENT_ACCUMULATED_STATS = 1;
|
||||||
|
|
||||||
private static final class MethodHandlers<Req, Resp> implements
|
private static final class MethodHandlers<Req, Resp> implements
|
||||||
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||||
|
|
@ -243,6 +323,10 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
serviceImpl.getClientStats((io.grpc.testing.integration.Messages.LoadBalancerStatsRequest) request,
|
serviceImpl.getClientStats((io.grpc.testing.integration.Messages.LoadBalancerStatsRequest) request,
|
||||||
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>) responseObserver);
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerStatsResponse>) responseObserver);
|
||||||
break;
|
break;
|
||||||
|
case METHODID_GET_CLIENT_ACCUMULATED_STATS:
|
||||||
|
serviceImpl.getClientAccumulatedStats((io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsRequest) request,
|
||||||
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.LoadBalancerAccumulatedStatsResponse>) responseObserver);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new AssertionError();
|
throw new AssertionError();
|
||||||
}
|
}
|
||||||
|
|
@ -269,6 +353,7 @@ public final class LoadBalancerStatsServiceGrpc {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||||||
.addMethod(getGetClientStatsMethod())
|
.addMethod(getGetClientStatsMethod())
|
||||||
|
.addMethod(getGetClientAccumulatedStatsMethod())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,278 @@
|
||||||
|
package io.grpc.testing.integration;
|
||||||
|
|
||||||
|
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.futureUnaryCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@javax.annotation.Generated(
|
||||||
|
value = "by gRPC proto compiler",
|
||||||
|
comments = "Source: grpc/testing/test.proto")
|
||||||
|
public final class XdsUpdateClientConfigureServiceGrpc {
|
||||||
|
|
||||||
|
private XdsUpdateClientConfigureServiceGrpc() {}
|
||||||
|
|
||||||
|
public static final String SERVICE_NAME = "grpc.testing.XdsUpdateClientConfigureService";
|
||||||
|
|
||||||
|
// Static method descriptors that strictly reflect the proto.
|
||||||
|
private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.ClientConfigureRequest,
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureResponse> getConfigureMethod;
|
||||||
|
|
||||||
|
@io.grpc.stub.annotations.RpcMethod(
|
||||||
|
fullMethodName = SERVICE_NAME + '/' + "Configure",
|
||||||
|
requestType = io.grpc.testing.integration.Messages.ClientConfigureRequest.class,
|
||||||
|
responseType = io.grpc.testing.integration.Messages.ClientConfigureResponse.class,
|
||||||
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
public static io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.ClientConfigureRequest,
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureResponse> getConfigureMethod() {
|
||||||
|
io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.ClientConfigureRequest, io.grpc.testing.integration.Messages.ClientConfigureResponse> getConfigureMethod;
|
||||||
|
if ((getConfigureMethod = XdsUpdateClientConfigureServiceGrpc.getConfigureMethod) == null) {
|
||||||
|
synchronized (XdsUpdateClientConfigureServiceGrpc.class) {
|
||||||
|
if ((getConfigureMethod = XdsUpdateClientConfigureServiceGrpc.getConfigureMethod) == null) {
|
||||||
|
XdsUpdateClientConfigureServiceGrpc.getConfigureMethod = getConfigureMethod =
|
||||||
|
io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.ClientConfigureRequest, io.grpc.testing.integration.Messages.ClientConfigureResponse>newBuilder()
|
||||||
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Configure"))
|
||||||
|
.setSampledToLocalTracing(true)
|
||||||
|
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureRequest.getDefaultInstance()))
|
||||||
|
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureResponse.getDefaultInstance()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getConfigureMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new async stub that supports all call types for the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateClientConfigureServiceStub newStub(io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateClientConfigureServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateClientConfigureServiceStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateClientConfigureServiceBlockingStub newBlockingStub(
|
||||||
|
io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceBlockingStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceBlockingStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateClientConfigureServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceBlockingStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateClientConfigureServiceBlockingStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new ListenableFuture-style stub that supports unary calls on the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateClientConfigureServiceFutureStub newFutureStub(
|
||||||
|
io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceFutureStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateClientConfigureServiceFutureStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateClientConfigureServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceFutureStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateClientConfigureServiceFutureStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static abstract class XdsUpdateClientConfigureServiceImplBase implements io.grpc.BindableService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Update the tes client's configuration.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public void configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.ClientConfigureResponse> responseObserver) {
|
||||||
|
asyncUnimplementedUnaryCall(getConfigureMethod(), responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
||||||
|
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||||
|
.addMethod(
|
||||||
|
getConfigureMethod(),
|
||||||
|
asyncUnaryCall(
|
||||||
|
new MethodHandlers<
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureRequest,
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureResponse>(
|
||||||
|
this, METHODID_CONFIGURE)))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateClientConfigureServiceStub extends io.grpc.stub.AbstractAsyncStub<XdsUpdateClientConfigureServiceStub> {
|
||||||
|
private XdsUpdateClientConfigureServiceStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateClientConfigureServiceStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Update the tes client's configuration.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public void configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.ClientConfigureResponse> responseObserver) {
|
||||||
|
asyncUnaryCall(
|
||||||
|
getChannel().newCall(getConfigureMethod(), getCallOptions()), request, responseObserver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateClientConfigureServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<XdsUpdateClientConfigureServiceBlockingStub> {
|
||||||
|
private XdsUpdateClientConfigureServiceBlockingStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateClientConfigureServiceBlockingStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceBlockingStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Update the tes client's configuration.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public io.grpc.testing.integration.Messages.ClientConfigureResponse configure(io.grpc.testing.integration.Messages.ClientConfigureRequest request) {
|
||||||
|
return blockingUnaryCall(
|
||||||
|
getChannel(), getConfigureMethod(), getCallOptions(), request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to dynamically update the configuration of an xDS test client.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateClientConfigureServiceFutureStub extends io.grpc.stub.AbstractFutureStub<XdsUpdateClientConfigureServiceFutureStub> {
|
||||||
|
private XdsUpdateClientConfigureServiceFutureStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateClientConfigureServiceFutureStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateClientConfigureServiceFutureStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Update the tes client's configuration.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Messages.ClientConfigureResponse> configure(
|
||||||
|
io.grpc.testing.integration.Messages.ClientConfigureRequest request) {
|
||||||
|
return futureUnaryCall(
|
||||||
|
getChannel().newCall(getConfigureMethod(), getCallOptions()), request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int METHODID_CONFIGURE = 0;
|
||||||
|
|
||||||
|
private static final class MethodHandlers<Req, Resp> implements
|
||||||
|
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||||
|
private final XdsUpdateClientConfigureServiceImplBase serviceImpl;
|
||||||
|
private final int methodId;
|
||||||
|
|
||||||
|
MethodHandlers(XdsUpdateClientConfigureServiceImplBase serviceImpl, int methodId) {
|
||||||
|
this.serviceImpl = serviceImpl;
|
||||||
|
this.methodId = methodId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@java.lang.SuppressWarnings("unchecked")
|
||||||
|
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||||
|
switch (methodId) {
|
||||||
|
case METHODID_CONFIGURE:
|
||||||
|
serviceImpl.configure((io.grpc.testing.integration.Messages.ClientConfigureRequest) request,
|
||||||
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.ClientConfigureResponse>) responseObserver);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@java.lang.SuppressWarnings("unchecked")
|
||||||
|
public io.grpc.stub.StreamObserver<Req> invoke(
|
||||||
|
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||||
|
switch (methodId) {
|
||||||
|
default:
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
|
||||||
|
|
||||||
|
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
|
||||||
|
io.grpc.ServiceDescriptor result = serviceDescriptor;
|
||||||
|
if (result == null) {
|
||||||
|
synchronized (XdsUpdateClientConfigureServiceGrpc.class) {
|
||||||
|
result = serviceDescriptor;
|
||||||
|
if (result == null) {
|
||||||
|
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||||||
|
.addMethod(getConfigureMethod())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,339 @@
|
||||||
|
package io.grpc.testing.integration;
|
||||||
|
|
||||||
|
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
|
||||||
|
import static io.grpc.stub.ClientCalls.futureUnaryCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||||
|
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@javax.annotation.Generated(
|
||||||
|
value = "by gRPC proto compiler",
|
||||||
|
comments = "Source: grpc/testing/test.proto")
|
||||||
|
public final class XdsUpdateHealthServiceGrpc {
|
||||||
|
|
||||||
|
private XdsUpdateHealthServiceGrpc() {}
|
||||||
|
|
||||||
|
public static final String SERVICE_NAME = "grpc.testing.XdsUpdateHealthService";
|
||||||
|
|
||||||
|
// Static method descriptors that strictly reflect the proto.
|
||||||
|
private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty> getSetServingMethod;
|
||||||
|
|
||||||
|
@io.grpc.stub.annotations.RpcMethod(
|
||||||
|
fullMethodName = SERVICE_NAME + '/' + "SetServing",
|
||||||
|
requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
|
||||||
|
responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
|
||||||
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
public static io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty> getSetServingMethod() {
|
||||||
|
io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty> getSetServingMethod;
|
||||||
|
if ((getSetServingMethod = XdsUpdateHealthServiceGrpc.getSetServingMethod) == null) {
|
||||||
|
synchronized (XdsUpdateHealthServiceGrpc.class) {
|
||||||
|
if ((getSetServingMethod = XdsUpdateHealthServiceGrpc.getSetServingMethod) == null) {
|
||||||
|
XdsUpdateHealthServiceGrpc.getSetServingMethod = getSetServingMethod =
|
||||||
|
io.grpc.MethodDescriptor.<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty>newBuilder()
|
||||||
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetServing"))
|
||||||
|
.setSampledToLocalTracing(true)
|
||||||
|
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
|
||||||
|
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getSetServingMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static volatile io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty> getSetNotServingMethod;
|
||||||
|
|
||||||
|
@io.grpc.stub.annotations.RpcMethod(
|
||||||
|
fullMethodName = SERVICE_NAME + '/' + "SetNotServing",
|
||||||
|
requestType = io.grpc.testing.integration.EmptyProtos.Empty.class,
|
||||||
|
responseType = io.grpc.testing.integration.EmptyProtos.Empty.class,
|
||||||
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
public static io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty> getSetNotServingMethod() {
|
||||||
|
io.grpc.MethodDescriptor<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty> getSetNotServingMethod;
|
||||||
|
if ((getSetNotServingMethod = XdsUpdateHealthServiceGrpc.getSetNotServingMethod) == null) {
|
||||||
|
synchronized (XdsUpdateHealthServiceGrpc.class) {
|
||||||
|
if ((getSetNotServingMethod = XdsUpdateHealthServiceGrpc.getSetNotServingMethod) == null) {
|
||||||
|
XdsUpdateHealthServiceGrpc.getSetNotServingMethod = getSetNotServingMethod =
|
||||||
|
io.grpc.MethodDescriptor.<io.grpc.testing.integration.EmptyProtos.Empty, io.grpc.testing.integration.EmptyProtos.Empty>newBuilder()
|
||||||
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||||
|
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetNotServing"))
|
||||||
|
.setSampledToLocalTracing(true)
|
||||||
|
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
|
||||||
|
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance()))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getSetNotServingMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new async stub that supports all call types for the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateHealthServiceStub newStub(io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateHealthServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateHealthServiceStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateHealthServiceBlockingStub newBlockingStub(
|
||||||
|
io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceBlockingStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceBlockingStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateHealthServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceBlockingStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateHealthServiceBlockingStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new ListenableFuture-style stub that supports unary calls on the service
|
||||||
|
*/
|
||||||
|
public static XdsUpdateHealthServiceFutureStub newFutureStub(
|
||||||
|
io.grpc.Channel channel) {
|
||||||
|
io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceFutureStub> factory =
|
||||||
|
new io.grpc.stub.AbstractStub.StubFactory<XdsUpdateHealthServiceFutureStub>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public XdsUpdateHealthServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceFutureStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return XdsUpdateHealthServiceFutureStub.newStub(factory, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static abstract class XdsUpdateHealthServiceImplBase implements io.grpc.BindableService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void setServing(io.grpc.testing.integration.EmptyProtos.Empty request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
|
||||||
|
asyncUnimplementedUnaryCall(getSetServingMethod(), responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
|
||||||
|
asyncUnimplementedUnaryCall(getSetNotServingMethod(), responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
||||||
|
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||||
|
.addMethod(
|
||||||
|
getSetServingMethod(),
|
||||||
|
asyncUnaryCall(
|
||||||
|
new MethodHandlers<
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty>(
|
||||||
|
this, METHODID_SET_SERVING)))
|
||||||
|
.addMethod(
|
||||||
|
getSetNotServingMethod(),
|
||||||
|
asyncUnaryCall(
|
||||||
|
new MethodHandlers<
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty,
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty>(
|
||||||
|
this, METHODID_SET_NOT_SERVING)))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateHealthServiceStub extends io.grpc.stub.AbstractAsyncStub<XdsUpdateHealthServiceStub> {
|
||||||
|
private XdsUpdateHealthServiceStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateHealthServiceStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void setServing(io.grpc.testing.integration.EmptyProtos.Empty request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
|
||||||
|
asyncUnaryCall(
|
||||||
|
getChannel().newCall(getSetServingMethod(), getCallOptions()), request, responseObserver);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request,
|
||||||
|
io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty> responseObserver) {
|
||||||
|
asyncUnaryCall(
|
||||||
|
getChannel().newCall(getSetNotServingMethod(), getCallOptions()), request, responseObserver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateHealthServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<XdsUpdateHealthServiceBlockingStub> {
|
||||||
|
private XdsUpdateHealthServiceBlockingStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateHealthServiceBlockingStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceBlockingStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public io.grpc.testing.integration.EmptyProtos.Empty setServing(io.grpc.testing.integration.EmptyProtos.Empty request) {
|
||||||
|
return blockingUnaryCall(
|
||||||
|
getChannel(), getSetServingMethod(), getCallOptions(), request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public io.grpc.testing.integration.EmptyProtos.Empty setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request) {
|
||||||
|
return blockingUnaryCall(
|
||||||
|
getChannel(), getSetNotServingMethod(), getCallOptions(), request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* A service to remotely control health status of an xDS test server.
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public static final class XdsUpdateHealthServiceFutureStub extends io.grpc.stub.AbstractFutureStub<XdsUpdateHealthServiceFutureStub> {
|
||||||
|
private XdsUpdateHealthServiceFutureStub(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
super(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected XdsUpdateHealthServiceFutureStub build(
|
||||||
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||||||
|
return new XdsUpdateHealthServiceFutureStub(channel, callOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.EmptyProtos.Empty> setServing(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty request) {
|
||||||
|
return futureUnaryCall(
|
||||||
|
getChannel().newCall(getSetServingMethod(), getCallOptions()), request);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.EmptyProtos.Empty> setNotServing(
|
||||||
|
io.grpc.testing.integration.EmptyProtos.Empty request) {
|
||||||
|
return futureUnaryCall(
|
||||||
|
getChannel().newCall(getSetNotServingMethod(), getCallOptions()), request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int METHODID_SET_SERVING = 0;
|
||||||
|
private static final int METHODID_SET_NOT_SERVING = 1;
|
||||||
|
|
||||||
|
private static final class MethodHandlers<Req, Resp> implements
|
||||||
|
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||||
|
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||||
|
private final XdsUpdateHealthServiceImplBase serviceImpl;
|
||||||
|
private final int methodId;
|
||||||
|
|
||||||
|
MethodHandlers(XdsUpdateHealthServiceImplBase serviceImpl, int methodId) {
|
||||||
|
this.serviceImpl = serviceImpl;
|
||||||
|
this.methodId = methodId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@java.lang.SuppressWarnings("unchecked")
|
||||||
|
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||||
|
switch (methodId) {
|
||||||
|
case METHODID_SET_SERVING:
|
||||||
|
serviceImpl.setServing((io.grpc.testing.integration.EmptyProtos.Empty) request,
|
||||||
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty>) responseObserver);
|
||||||
|
break;
|
||||||
|
case METHODID_SET_NOT_SERVING:
|
||||||
|
serviceImpl.setNotServing((io.grpc.testing.integration.EmptyProtos.Empty) request,
|
||||||
|
(io.grpc.stub.StreamObserver<io.grpc.testing.integration.EmptyProtos.Empty>) responseObserver);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@java.lang.SuppressWarnings("unchecked")
|
||||||
|
public io.grpc.stub.StreamObserver<Req> invoke(
|
||||||
|
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||||
|
switch (methodId) {
|
||||||
|
default:
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
|
||||||
|
|
||||||
|
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
|
||||||
|
io.grpc.ServiceDescriptor result = serviceDescriptor;
|
||||||
|
if (result == null) {
|
||||||
|
synchronized (XdsUpdateHealthServiceGrpc.class) {
|
||||||
|
result = serviceDescriptor;
|
||||||
|
if (result == null) {
|
||||||
|
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||||||
|
.addMethod(getSetServingMethod())
|
||||||
|
.addMethod(getSetNotServingMethod())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue