io.envoyproxy.envoy.service.rate_limit_quota.v3.RateLimitQuotaServiceGrpc Maven / Gradle / Ivy
The newest version!
package io.envoyproxy.envoy.service.rate_limit_quota.v3;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Defines the Rate Limit Quota Service (RLQS).
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: envoy/service/rate_limit_quota/v3/rlqs.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class RateLimitQuotaServiceGrpc {
private RateLimitQuotaServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "envoy.service.rate_limit_quota.v3.RateLimitQuotaService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getStreamRateLimitQuotasMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "StreamRateLimitQuotas",
requestType = io.envoyproxy.envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports.class,
responseType = io.envoyproxy.envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getStreamRateLimitQuotasMethod() {
io.grpc.MethodDescriptor getStreamRateLimitQuotasMethod;
if ((getStreamRateLimitQuotasMethod = RateLimitQuotaServiceGrpc.getStreamRateLimitQuotasMethod) == null) {
synchronized (RateLimitQuotaServiceGrpc.class) {
if ((getStreamRateLimitQuotasMethod = RateLimitQuotaServiceGrpc.getStreamRateLimitQuotasMethod) == null) {
RateLimitQuotaServiceGrpc.getStreamRateLimitQuotasMethod = getStreamRateLimitQuotasMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamRateLimitQuotas"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.envoyproxy.envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.getDefaultInstance()))
.setSchemaDescriptor(new RateLimitQuotaServiceMethodDescriptorSupplier("StreamRateLimitQuotas"))
.build();
}
}
}
return getStreamRateLimitQuotasMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static RateLimitQuotaServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RateLimitQuotaServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitQuotaServiceStub(channel, callOptions);
}
};
return RateLimitQuotaServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static RateLimitQuotaServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RateLimitQuotaServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitQuotaServiceBlockingStub(channel, callOptions);
}
};
return RateLimitQuotaServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static RateLimitQuotaServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RateLimitQuotaServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitQuotaServiceFutureStub(channel, callOptions);
}
};
return RateLimitQuotaServiceFutureStub.newStub(factory, channel);
}
/**
*
* Defines the Rate Limit Quota Service (RLQS).
*
*/
public interface AsyncService {
/**
*
* Main communication channel: the data plane sends usage reports to the RLQS server,
* and the server asynchronously responding with the assignments.
*
*/
default io.grpc.stub.StreamObserver streamRateLimitQuotas(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamRateLimitQuotasMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service RateLimitQuotaService.
*
* Defines the Rate Limit Quota Service (RLQS).
*
*/
public static abstract class RateLimitQuotaServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return RateLimitQuotaServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service RateLimitQuotaService.
*
* Defines the Rate Limit Quota Service (RLQS).
*
*/
public static final class RateLimitQuotaServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private RateLimitQuotaServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RateLimitQuotaServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitQuotaServiceStub(channel, callOptions);
}
/**
*
* Main communication channel: the data plane sends usage reports to the RLQS server,
* and the server asynchronously responding with the assignments.
*
*/
public io.grpc.stub.StreamObserver streamRateLimitQuotas(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getStreamRateLimitQuotasMethod(), getCallOptions()), responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service RateLimitQuotaService.
*
* Defines the Rate Limit Quota Service (RLQS).
*
*/
public static final class RateLimitQuotaServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private RateLimitQuotaServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RateLimitQuotaServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitQuotaServiceBlockingStub(channel, callOptions);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service RateLimitQuotaService.
*
* Defines the Rate Limit Quota Service (RLQS).
*
*/
public static final class RateLimitQuotaServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private RateLimitQuotaServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RateLimitQuotaServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RateLimitQuotaServiceFutureStub(channel, callOptions);
}
}
private static final int METHODID_STREAM_RATE_LIMIT_QUOTAS = 0;
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) {
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_STREAM_RATE_LIMIT_QUOTAS:
return (io.grpc.stub.StreamObserver) serviceImpl.streamRateLimitQuotas(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getStreamRateLimitQuotasMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
io.envoyproxy.envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports,
io.envoyproxy.envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse>(
service, METHODID_STREAM_RATE_LIMIT_QUOTAS)))
.build();
}
private static abstract class RateLimitQuotaServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
RateLimitQuotaServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.envoyproxy.envoy.service.rate_limit_quota.v3.RlqsProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("RateLimitQuotaService");
}
}
private static final class RateLimitQuotaServiceFileDescriptorSupplier
extends RateLimitQuotaServiceBaseDescriptorSupplier {
RateLimitQuotaServiceFileDescriptorSupplier() {}
}
private static final class RateLimitQuotaServiceMethodDescriptorSupplier
extends RateLimitQuotaServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
RateLimitQuotaServiceMethodDescriptorSupplier(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 (RateLimitQuotaServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new RateLimitQuotaServiceFileDescriptorSupplier())
.addMethod(getStreamRateLimitQuotasMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy