com.zepben.protobuf.mc.MeasurementConsumerGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of evolve-grpc Show documentation
Show all versions of evolve-grpc Show documentation
Protobuf and gRPC definitions for the evolve platform
package com.zepben.protobuf.mc;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.59.1)",
comments = "Source: zepben/protobuf/mc/mc.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class MeasurementConsumerGrpc {
private MeasurementConsumerGrpc() {}
public static final java.lang.String SERVICE_NAME = "zepben.protobuf.mc.MeasurementConsumer";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetAccumulatorValuesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getAccumulatorValues",
requestType = com.zepben.protobuf.mc.GetAccumulatorValueRequest.class,
responseType = com.zepben.protobuf.mc.GetAccumulatorValueResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getGetAccumulatorValuesMethod() {
io.grpc.MethodDescriptor getGetAccumulatorValuesMethod;
if ((getGetAccumulatorValuesMethod = MeasurementConsumerGrpc.getGetAccumulatorValuesMethod) == null) {
synchronized (MeasurementConsumerGrpc.class) {
if ((getGetAccumulatorValuesMethod = MeasurementConsumerGrpc.getGetAccumulatorValuesMethod) == null) {
MeasurementConsumerGrpc.getGetAccumulatorValuesMethod = getGetAccumulatorValuesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getAccumulatorValues"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.mc.GetAccumulatorValueRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.mc.GetAccumulatorValueResponse.getDefaultInstance()))
.setSchemaDescriptor(new MeasurementConsumerMethodDescriptorSupplier("getAccumulatorValues"))
.build();
}
}
}
return getGetAccumulatorValuesMethod;
}
private static volatile io.grpc.MethodDescriptor getGetAnalogValuesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getAnalogValues",
requestType = com.zepben.protobuf.mc.GetAnalogValueRequest.class,
responseType = com.zepben.protobuf.mc.GetAnalogValueResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getGetAnalogValuesMethod() {
io.grpc.MethodDescriptor getGetAnalogValuesMethod;
if ((getGetAnalogValuesMethod = MeasurementConsumerGrpc.getGetAnalogValuesMethod) == null) {
synchronized (MeasurementConsumerGrpc.class) {
if ((getGetAnalogValuesMethod = MeasurementConsumerGrpc.getGetAnalogValuesMethod) == null) {
MeasurementConsumerGrpc.getGetAnalogValuesMethod = getGetAnalogValuesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getAnalogValues"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.mc.GetAnalogValueRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.mc.GetAnalogValueResponse.getDefaultInstance()))
.setSchemaDescriptor(new MeasurementConsumerMethodDescriptorSupplier("getAnalogValues"))
.build();
}
}
}
return getGetAnalogValuesMethod;
}
private static volatile io.grpc.MethodDescriptor getGetDiscreteValuesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getDiscreteValues",
requestType = com.zepben.protobuf.mc.GetDiscreteValueRequest.class,
responseType = com.zepben.protobuf.mc.GetDiscreteValueResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getGetDiscreteValuesMethod() {
io.grpc.MethodDescriptor getGetDiscreteValuesMethod;
if ((getGetDiscreteValuesMethod = MeasurementConsumerGrpc.getGetDiscreteValuesMethod) == null) {
synchronized (MeasurementConsumerGrpc.class) {
if ((getGetDiscreteValuesMethod = MeasurementConsumerGrpc.getGetDiscreteValuesMethod) == null) {
MeasurementConsumerGrpc.getGetDiscreteValuesMethod = getGetDiscreteValuesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getDiscreteValues"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.mc.GetDiscreteValueRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.mc.GetDiscreteValueResponse.getDefaultInstance()))
.setSchemaDescriptor(new MeasurementConsumerMethodDescriptorSupplier("getDiscreteValues"))
.build();
}
}
}
return getGetDiscreteValuesMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static MeasurementConsumerStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MeasurementConsumerStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MeasurementConsumerStub(channel, callOptions);
}
};
return MeasurementConsumerStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static MeasurementConsumerBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MeasurementConsumerBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MeasurementConsumerBlockingStub(channel, callOptions);
}
};
return MeasurementConsumerBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static MeasurementConsumerFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public MeasurementConsumerFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MeasurementConsumerFutureStub(channel, callOptions);
}
};
return MeasurementConsumerFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*/
default void getAccumulatorValues(com.zepben.protobuf.mc.GetAccumulatorValueRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAccumulatorValuesMethod(), responseObserver);
}
/**
*/
default void getAnalogValues(com.zepben.protobuf.mc.GetAnalogValueRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAnalogValuesMethod(), responseObserver);
}
/**
*/
default void getDiscreteValues(com.zepben.protobuf.mc.GetDiscreteValueRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDiscreteValuesMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service MeasurementConsumer.
*/
public static abstract class MeasurementConsumerImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return MeasurementConsumerGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service MeasurementConsumer.
*/
public static final class MeasurementConsumerStub
extends io.grpc.stub.AbstractAsyncStub {
private MeasurementConsumerStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MeasurementConsumerStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MeasurementConsumerStub(channel, callOptions);
}
/**
*/
public void getAccumulatorValues(com.zepben.protobuf.mc.GetAccumulatorValueRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getGetAccumulatorValuesMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getAnalogValues(com.zepben.protobuf.mc.GetAnalogValueRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getGetAnalogValuesMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getDiscreteValues(com.zepben.protobuf.mc.GetDiscreteValueRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getGetDiscreteValuesMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service MeasurementConsumer.
*/
public static final class MeasurementConsumerBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private MeasurementConsumerBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MeasurementConsumerBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MeasurementConsumerBlockingStub(channel, callOptions);
}
/**
*/
public java.util.Iterator getAccumulatorValues(
com.zepben.protobuf.mc.GetAccumulatorValueRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getGetAccumulatorValuesMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator getAnalogValues(
com.zepben.protobuf.mc.GetAnalogValueRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getGetAnalogValuesMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator getDiscreteValues(
com.zepben.protobuf.mc.GetDiscreteValueRequest request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getGetDiscreteValuesMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service MeasurementConsumer.
*/
public static final class MeasurementConsumerFutureStub
extends io.grpc.stub.AbstractFutureStub {
private MeasurementConsumerFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected MeasurementConsumerFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new MeasurementConsumerFutureStub(channel, callOptions);
}
}
private static final int METHODID_GET_ACCUMULATOR_VALUES = 0;
private static final int METHODID_GET_ANALOG_VALUES = 1;
private static final int METHODID_GET_DISCRETE_VALUES = 2;
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_GET_ACCUMULATOR_VALUES:
serviceImpl.getAccumulatorValues((com.zepben.protobuf.mc.GetAccumulatorValueRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_ANALOG_VALUES:
serviceImpl.getAnalogValues((com.zepben.protobuf.mc.GetAnalogValueRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_DISCRETE_VALUES:
serviceImpl.getDiscreteValues((com.zepben.protobuf.mc.GetDiscreteValueRequest) 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(
getGetAccumulatorValuesMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
com.zepben.protobuf.mc.GetAccumulatorValueRequest,
com.zepben.protobuf.mc.GetAccumulatorValueResponse>(
service, METHODID_GET_ACCUMULATOR_VALUES)))
.addMethod(
getGetAnalogValuesMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
com.zepben.protobuf.mc.GetAnalogValueRequest,
com.zepben.protobuf.mc.GetAnalogValueResponse>(
service, METHODID_GET_ANALOG_VALUES)))
.addMethod(
getGetDiscreteValuesMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
com.zepben.protobuf.mc.GetDiscreteValueRequest,
com.zepben.protobuf.mc.GetDiscreteValueResponse>(
service, METHODID_GET_DISCRETE_VALUES)))
.build();
}
private static abstract class MeasurementConsumerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
MeasurementConsumerBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.zepben.protobuf.mc.Mc.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("MeasurementConsumer");
}
}
private static final class MeasurementConsumerFileDescriptorSupplier
extends MeasurementConsumerBaseDescriptorSupplier {
MeasurementConsumerFileDescriptorSupplier() {}
}
private static final class MeasurementConsumerMethodDescriptorSupplier
extends MeasurementConsumerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
MeasurementConsumerMethodDescriptorSupplier(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 (MeasurementConsumerGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new MeasurementConsumerFileDescriptorSupplier())
.addMethod(getGetAccumulatorValuesMethod())
.addMethod(getGetAnalogValuesMethod())
.addMethod(getGetDiscreteValuesMethod())
.build();
}
}
}
return result;
}
}