
io.github.pnoker.api.center.manager.DeviceApiGrpc Maven / Gradle / Ivy
package io.github.pnoker.api.center.manager;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* 接口类
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.53.0)",
comments = "Source: device.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class DeviceApiGrpc {
private DeviceApiGrpc() {}
public static final String SERVICE_NAME = "api.center.manager.DeviceApi";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getListMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "list",
requestType = io.github.pnoker.api.center.manager.PageDeviceQueryDTO.class,
responseType = io.github.pnoker.api.center.manager.RPageDeviceDTO.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getListMethod() {
io.grpc.MethodDescriptor getListMethod;
if ((getListMethod = DeviceApiGrpc.getListMethod) == null) {
synchronized (DeviceApiGrpc.class) {
if ((getListMethod = DeviceApiGrpc.getListMethod) == null) {
DeviceApiGrpc.getListMethod = getListMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "list"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.github.pnoker.api.center.manager.PageDeviceQueryDTO.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.github.pnoker.api.center.manager.RPageDeviceDTO.getDefaultInstance()))
.setSchemaDescriptor(new DeviceApiMethodDescriptorSupplier("list"))
.build();
}
}
}
return getListMethod;
}
private static volatile io.grpc.MethodDescriptor getSelectByProfileIdMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "selectByProfileId",
requestType = io.github.pnoker.api.center.manager.ByProfileQueryDTO.class,
responseType = io.github.pnoker.api.center.manager.RDeviceListDTO.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getSelectByProfileIdMethod() {
io.grpc.MethodDescriptor getSelectByProfileIdMethod;
if ((getSelectByProfileIdMethod = DeviceApiGrpc.getSelectByProfileIdMethod) == null) {
synchronized (DeviceApiGrpc.class) {
if ((getSelectByProfileIdMethod = DeviceApiGrpc.getSelectByProfileIdMethod) == null) {
DeviceApiGrpc.getSelectByProfileIdMethod = getSelectByProfileIdMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "selectByProfileId"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.github.pnoker.api.center.manager.ByProfileQueryDTO.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.github.pnoker.api.center.manager.RDeviceListDTO.getDefaultInstance()))
.setSchemaDescriptor(new DeviceApiMethodDescriptorSupplier("selectByProfileId"))
.build();
}
}
}
return getSelectByProfileIdMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static DeviceApiStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public DeviceApiStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DeviceApiStub(channel, callOptions);
}
};
return DeviceApiStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static DeviceApiBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public DeviceApiBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DeviceApiBlockingStub(channel, callOptions);
}
};
return DeviceApiBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static DeviceApiFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public DeviceApiFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DeviceApiFutureStub(channel, callOptions);
}
};
return DeviceApiFutureStub.newStub(factory, channel);
}
/**
*
* 接口类
*
*/
public static abstract class DeviceApiImplBase implements io.grpc.BindableService {
/**
*/
public void list(io.github.pnoker.api.center.manager.PageDeviceQueryDTO request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMethod(), responseObserver);
}
/**
*/
public void selectByProfileId(io.github.pnoker.api.center.manager.ByProfileQueryDTO request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectByProfileIdMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getListMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.github.pnoker.api.center.manager.PageDeviceQueryDTO,
io.github.pnoker.api.center.manager.RPageDeviceDTO>(
this, METHODID_LIST)))
.addMethod(
getSelectByProfileIdMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
io.github.pnoker.api.center.manager.ByProfileQueryDTO,
io.github.pnoker.api.center.manager.RDeviceListDTO>(
this, METHODID_SELECT_BY_PROFILE_ID)))
.build();
}
}
/**
*
* 接口类
*
*/
public static final class DeviceApiStub extends io.grpc.stub.AbstractAsyncStub {
private DeviceApiStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DeviceApiStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DeviceApiStub(channel, callOptions);
}
/**
*/
public void list(io.github.pnoker.api.center.manager.PageDeviceQueryDTO request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void selectByProfileId(io.github.pnoker.api.center.manager.ByProfileQueryDTO request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSelectByProfileIdMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*
* 接口类
*
*/
public static final class DeviceApiBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private DeviceApiBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DeviceApiBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DeviceApiBlockingStub(channel, callOptions);
}
/**
*/
public io.github.pnoker.api.center.manager.RPageDeviceDTO list(io.github.pnoker.api.center.manager.PageDeviceQueryDTO request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListMethod(), getCallOptions(), request);
}
/**
*/
public io.github.pnoker.api.center.manager.RDeviceListDTO selectByProfileId(io.github.pnoker.api.center.manager.ByProfileQueryDTO request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSelectByProfileIdMethod(), getCallOptions(), request);
}
}
/**
*
* 接口类
*
*/
public static final class DeviceApiFutureStub extends io.grpc.stub.AbstractFutureStub {
private DeviceApiFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected DeviceApiFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new DeviceApiFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture list(
io.github.pnoker.api.center.manager.PageDeviceQueryDTO request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture selectByProfileId(
io.github.pnoker.api.center.manager.ByProfileQueryDTO request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSelectByProfileIdMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST = 0;
private static final int METHODID_SELECT_BY_PROFILE_ID = 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 DeviceApiImplBase serviceImpl;
private final int methodId;
MethodHandlers(DeviceApiImplBase 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_LIST:
serviceImpl.list((io.github.pnoker.api.center.manager.PageDeviceQueryDTO) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_SELECT_BY_PROFILE_ID:
serviceImpl.selectByProfileId((io.github.pnoker.api.center.manager.ByProfileQueryDTO) 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();
}
}
}
private static abstract class DeviceApiBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
DeviceApiBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.github.pnoker.api.center.manager.DeviceProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("DeviceApi");
}
}
private static final class DeviceApiFileDescriptorSupplier
extends DeviceApiBaseDescriptorSupplier {
DeviceApiFileDescriptorSupplier() {}
}
private static final class DeviceApiMethodDescriptorSupplier
extends DeviceApiBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
DeviceApiMethodDescriptorSupplier(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 (DeviceApiGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new DeviceApiFileDescriptorSupplier())
.addMethod(getListMethod())
.addMethod(getSelectByProfileIdMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy