com.zepben.protobuf.cc.CustomerConsumerGrpc 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.cc;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.59.1)",
comments = "Source: zepben/protobuf/cc/cc.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class CustomerConsumerGrpc {
private CustomerConsumerGrpc() {}
public static final java.lang.String SERVICE_NAME = "zepben.protobuf.cc.CustomerConsumer";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetIdentifiedObjectsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getIdentifiedObjects",
requestType = com.zepben.protobuf.cc.GetIdentifiedObjectsRequest.class,
responseType = com.zepben.protobuf.cc.GetIdentifiedObjectsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getGetIdentifiedObjectsMethod() {
io.grpc.MethodDescriptor getGetIdentifiedObjectsMethod;
if ((getGetIdentifiedObjectsMethod = CustomerConsumerGrpc.getGetIdentifiedObjectsMethod) == null) {
synchronized (CustomerConsumerGrpc.class) {
if ((getGetIdentifiedObjectsMethod = CustomerConsumerGrpc.getGetIdentifiedObjectsMethod) == null) {
CustomerConsumerGrpc.getGetIdentifiedObjectsMethod = getGetIdentifiedObjectsMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getIdentifiedObjects"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.cc.GetIdentifiedObjectsRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.cc.GetIdentifiedObjectsResponse.getDefaultInstance()))
.setSchemaDescriptor(new CustomerConsumerMethodDescriptorSupplier("getIdentifiedObjects"))
.build();
}
}
}
return getGetIdentifiedObjectsMethod;
}
private static volatile io.grpc.MethodDescriptor getGetCustomersForContainerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getCustomersForContainer",
requestType = com.zepben.protobuf.cc.GetCustomersForContainerRequest.class,
responseType = com.zepben.protobuf.cc.GetCustomersForContainerResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getGetCustomersForContainerMethod() {
io.grpc.MethodDescriptor getGetCustomersForContainerMethod;
if ((getGetCustomersForContainerMethod = CustomerConsumerGrpc.getGetCustomersForContainerMethod) == null) {
synchronized (CustomerConsumerGrpc.class) {
if ((getGetCustomersForContainerMethod = CustomerConsumerGrpc.getGetCustomersForContainerMethod) == null) {
CustomerConsumerGrpc.getGetCustomersForContainerMethod = getGetCustomersForContainerMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getCustomersForContainer"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.cc.GetCustomersForContainerRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.cc.GetCustomersForContainerResponse.getDefaultInstance()))
.setSchemaDescriptor(new CustomerConsumerMethodDescriptorSupplier("getCustomersForContainer"))
.build();
}
}
}
return getGetCustomersForContainerMethod;
}
private static volatile io.grpc.MethodDescriptor getGetMetadataMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getMetadata",
requestType = com.zepben.protobuf.metadata.GetMetadataRequest.class,
responseType = com.zepben.protobuf.metadata.GetMetadataResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetMetadataMethod() {
io.grpc.MethodDescriptor getGetMetadataMethod;
if ((getGetMetadataMethod = CustomerConsumerGrpc.getGetMetadataMethod) == null) {
synchronized (CustomerConsumerGrpc.class) {
if ((getGetMetadataMethod = CustomerConsumerGrpc.getGetMetadataMethod) == null) {
CustomerConsumerGrpc.getGetMetadataMethod = getGetMetadataMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getMetadata"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.metadata.GetMetadataRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.zepben.protobuf.metadata.GetMetadataResponse.getDefaultInstance()))
.setSchemaDescriptor(new CustomerConsumerMethodDescriptorSupplier("getMetadata"))
.build();
}
}
}
return getGetMetadataMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static CustomerConsumerStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public CustomerConsumerStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CustomerConsumerStub(channel, callOptions);
}
};
return CustomerConsumerStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static CustomerConsumerBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public CustomerConsumerBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CustomerConsumerBlockingStub(channel, callOptions);
}
};
return CustomerConsumerBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static CustomerConsumerFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public CustomerConsumerFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CustomerConsumerFutureStub(channel, callOptions);
}
};
return CustomerConsumerFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*
* Get identified objects
*
*/
default io.grpc.stub.StreamObserver getIdentifiedObjects(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getGetIdentifiedObjectsMethod(), responseObserver);
}
/**
*
* Get customers for a given EquipmentContainer
*
*/
default io.grpc.stub.StreamObserver getCustomersForContainer(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getGetCustomersForContainerMethod(), responseObserver);
}
/**
*
* Get Metadata related to the service
*
*/
default void getMetadata(com.zepben.protobuf.metadata.GetMetadataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMetadataMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service CustomerConsumer.
*/
public static abstract class CustomerConsumerImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return CustomerConsumerGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service CustomerConsumer.
*/
public static final class CustomerConsumerStub
extends io.grpc.stub.AbstractAsyncStub {
private CustomerConsumerStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CustomerConsumerStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CustomerConsumerStub(channel, callOptions);
}
/**
*
* Get identified objects
*
*/
public io.grpc.stub.StreamObserver getIdentifiedObjects(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getGetIdentifiedObjectsMethod(), getCallOptions()), responseObserver);
}
/**
*
* Get customers for a given EquipmentContainer
*
*/
public io.grpc.stub.StreamObserver getCustomersForContainer(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getGetCustomersForContainerMethod(), getCallOptions()), responseObserver);
}
/**
*
* Get Metadata related to the service
*
*/
public void getMetadata(com.zepben.protobuf.metadata.GetMetadataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetMetadataMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service CustomerConsumer.
*/
public static final class CustomerConsumerBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private CustomerConsumerBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CustomerConsumerBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CustomerConsumerBlockingStub(channel, callOptions);
}
/**
*
* Get Metadata related to the service
*
*/
public com.zepben.protobuf.metadata.GetMetadataResponse getMetadata(com.zepben.protobuf.metadata.GetMetadataRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetMetadataMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service CustomerConsumer.
*/
public static final class CustomerConsumerFutureStub
extends io.grpc.stub.AbstractFutureStub {
private CustomerConsumerFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CustomerConsumerFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new CustomerConsumerFutureStub(channel, callOptions);
}
/**
*
* Get Metadata related to the service
*
*/
public com.google.common.util.concurrent.ListenableFuture getMetadata(
com.zepben.protobuf.metadata.GetMetadataRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetMetadataMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_METADATA = 0;
private static final int METHODID_GET_IDENTIFIED_OBJECTS = 1;
private static final int METHODID_GET_CUSTOMERS_FOR_CONTAINER = 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_METADATA:
serviceImpl.getMetadata((com.zepben.protobuf.metadata.GetMetadataRequest) 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) {
case METHODID_GET_IDENTIFIED_OBJECTS:
return (io.grpc.stub.StreamObserver) serviceImpl.getIdentifiedObjects(
(io.grpc.stub.StreamObserver) responseObserver);
case METHODID_GET_CUSTOMERS_FOR_CONTAINER:
return (io.grpc.stub.StreamObserver) serviceImpl.getCustomersForContainer(
(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(
getGetIdentifiedObjectsMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
com.zepben.protobuf.cc.GetIdentifiedObjectsRequest,
com.zepben.protobuf.cc.GetIdentifiedObjectsResponse>(
service, METHODID_GET_IDENTIFIED_OBJECTS)))
.addMethod(
getGetCustomersForContainerMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
com.zepben.protobuf.cc.GetCustomersForContainerRequest,
com.zepben.protobuf.cc.GetCustomersForContainerResponse>(
service, METHODID_GET_CUSTOMERS_FOR_CONTAINER)))
.addMethod(
getGetMetadataMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.zepben.protobuf.metadata.GetMetadataRequest,
com.zepben.protobuf.metadata.GetMetadataResponse>(
service, METHODID_GET_METADATA)))
.build();
}
private static abstract class CustomerConsumerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
CustomerConsumerBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.zepben.protobuf.cc.Cc.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("CustomerConsumer");
}
}
private static final class CustomerConsumerFileDescriptorSupplier
extends CustomerConsumerBaseDescriptorSupplier {
CustomerConsumerFileDescriptorSupplier() {}
}
private static final class CustomerConsumerMethodDescriptorSupplier
extends CustomerConsumerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
CustomerConsumerMethodDescriptorSupplier(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 (CustomerConsumerGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new CustomerConsumerFileDescriptorSupplier())
.addMethod(getGetIdentifiedObjectsMethod())
.addMethod(getGetCustomersForContainerMethod())
.addMethod(getGetMetadataMethod())
.build();
}
}
}
return result;
}
}