All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.grpc.testing.integration.XdsUpdateHealthServiceGrpc Maven / Gradle / Ivy

There is a newer version: 1.68.0
Show newest version
package io.grpc.testing.integration;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * A service to remotely control health status of an xDS test server.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: grpc/testing/test.proto") @io.grpc.stub.annotations.GrpcGenerated public final class XdsUpdateHealthServiceGrpc { private XdsUpdateHealthServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "grpc.testing.XdsUpdateHealthService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor 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 getSetServingMethod() { io.grpc.MethodDescriptor getSetServingMethod; if ((getSetServingMethod = XdsUpdateHealthServiceGrpc.getSetServingMethod) == null) { synchronized (XdsUpdateHealthServiceGrpc.class) { if ((getSetServingMethod = XdsUpdateHealthServiceGrpc.getSetServingMethod) == null) { XdsUpdateHealthServiceGrpc.getSetServingMethod = getSetServingMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetServing")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance())) .setSchemaDescriptor(new XdsUpdateHealthServiceMethodDescriptorSupplier("SetServing")) .build(); } } } return getSetServingMethod; } private static volatile io.grpc.MethodDescriptor 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 getSetNotServingMethod() { io.grpc.MethodDescriptor getSetNotServingMethod; if ((getSetNotServingMethod = XdsUpdateHealthServiceGrpc.getSetNotServingMethod) == null) { synchronized (XdsUpdateHealthServiceGrpc.class) { if ((getSetNotServingMethod = XdsUpdateHealthServiceGrpc.getSetNotServingMethod) == null) { XdsUpdateHealthServiceGrpc.getSetNotServingMethod = getSetNotServingMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetNotServing")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( io.grpc.testing.integration.EmptyProtos.Empty.getDefaultInstance())) .setSchemaDescriptor(new XdsUpdateHealthServiceMethodDescriptorSupplier("SetNotServing")) .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 factory = new io.grpc.stub.AbstractStub.StubFactory() { @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 factory = new io.grpc.stub.AbstractStub.StubFactory() { @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 factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public XdsUpdateHealthServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new XdsUpdateHealthServiceFutureStub(channel, callOptions); } }; return XdsUpdateHealthServiceFutureStub.newStub(factory, channel); } /** *
   * A service to remotely control health status of an xDS test server.
   * 
*/ public interface AsyncService { /** */ default void setServing(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServingMethod(), responseObserver); } /** */ 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 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 { 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 responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getSetServingMethod(), getCallOptions()), request, responseObserver); } /** */ public void setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getSetNotServingMethod(), getCallOptions()), request, responseObserver); } } /** * 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 { 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 io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getSetServingMethod(), getCallOptions(), request); } /** */ public io.grpc.testing.integration.EmptyProtos.Empty setNotServing(io.grpc.testing.integration.EmptyProtos.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getSetNotServingMethod(), getCallOptions(), request); } } /** * 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 { 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 setServing( io.grpc.testing.integration.EmptyProtos.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getSetServingMethod(), getCallOptions()), request); } /** */ public com.google.common.util.concurrent.ListenableFuture setNotServing( io.grpc.testing.integration.EmptyProtos.Empty request) { return io.grpc.stub.ClientCalls.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 implements io.grpc.stub.ServerCalls.UnaryMethod, io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { private final AsyncService serviceImpl; private final int methodId; MethodHandlers(AsyncService 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 responseObserver) { switch (methodId) { case METHODID_SET_SERVING: serviceImpl.setServing((io.grpc.testing.integration.EmptyProtos.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_SET_NOT_SERVING: serviceImpl.setNotServing((io.grpc.testing.integration.EmptyProtos.Empty) request, (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { default: throw new AssertionError(); } } } 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 abstract class XdsUpdateHealthServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { XdsUpdateHealthServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return io.grpc.testing.integration.Test.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("XdsUpdateHealthService"); } } private static final class XdsUpdateHealthServiceFileDescriptorSupplier extends XdsUpdateHealthServiceBaseDescriptorSupplier { XdsUpdateHealthServiceFileDescriptorSupplier() {} } private static final class XdsUpdateHealthServiceMethodDescriptorSupplier extends XdsUpdateHealthServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; XdsUpdateHealthServiceMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } @java.lang.Override public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { return getServiceDescriptor().findMethodByName(methodName); } } 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) .setSchemaDescriptor(new XdsUpdateHealthServiceFileDescriptorSupplier()) .addMethod(getSetServingMethod()) .addMethod(getSetNotServingMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy