277 lines
10 KiB
Java
277 lines
10 KiB
Java
|
|
package cmvr.api;
|
||
|
|
|
||
|
|
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
@javax.annotation.Generated(
|
||
|
|
value = "by gRPC proto compiler (version 1.52.0)",
|
||
|
|
comments = "Source: cmvr/api/hlc_service.proto")
|
||
|
|
@io.grpc.stub.annotations.GrpcGenerated
|
||
|
|
public final class HlcServiceGrpc {
|
||
|
|
|
||
|
|
private HlcServiceGrpc() {}
|
||
|
|
|
||
|
|
public static final String SERVICE_NAME = "cmvr.api.HlcService";
|
||
|
|
|
||
|
|
// Static method descriptors that strictly reflect the proto.
|
||
|
|
private static volatile io.grpc.MethodDescriptor<cmvr.api.HlcCommand.Touch.Request,
|
||
|
|
cmvr.api.HlcCommand.Touch.Response> getTouchMethod;
|
||
|
|
|
||
|
|
@io.grpc.stub.annotations.RpcMethod(
|
||
|
|
fullMethodName = SERVICE_NAME + '/' + "touch",
|
||
|
|
requestType = cmvr.api.HlcCommand.Touch.Request.class,
|
||
|
|
responseType = cmvr.api.HlcCommand.Touch.Response.class,
|
||
|
|
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
|
||
|
|
public static io.grpc.MethodDescriptor<cmvr.api.HlcCommand.Touch.Request,
|
||
|
|
cmvr.api.HlcCommand.Touch.Response> getTouchMethod() {
|
||
|
|
io.grpc.MethodDescriptor<cmvr.api.HlcCommand.Touch.Request, cmvr.api.HlcCommand.Touch.Response> getTouchMethod;
|
||
|
|
if ((getTouchMethod = HlcServiceGrpc.getTouchMethod) == null) {
|
||
|
|
synchronized (HlcServiceGrpc.class) {
|
||
|
|
if ((getTouchMethod = HlcServiceGrpc.getTouchMethod) == null) {
|
||
|
|
HlcServiceGrpc.getTouchMethod = getTouchMethod =
|
||
|
|
io.grpc.MethodDescriptor.<cmvr.api.HlcCommand.Touch.Request, cmvr.api.HlcCommand.Touch.Response>newBuilder()
|
||
|
|
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||
|
|
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "touch"))
|
||
|
|
.setSampledToLocalTracing(true)
|
||
|
|
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||
|
|
cmvr.api.HlcCommand.Touch.Request.getDefaultInstance()))
|
||
|
|
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||
|
|
cmvr.api.HlcCommand.Touch.Response.getDefaultInstance()))
|
||
|
|
.setSchemaDescriptor(new HlcServiceMethodDescriptorSupplier("touch"))
|
||
|
|
.build();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return getTouchMethod;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates a new async stub that supports all call types for the service
|
||
|
|
*/
|
||
|
|
public static HlcServiceStub newStub(io.grpc.Channel channel) {
|
||
|
|
io.grpc.stub.AbstractStub.StubFactory<HlcServiceStub> factory =
|
||
|
|
new io.grpc.stub.AbstractStub.StubFactory<HlcServiceStub>() {
|
||
|
|
@java.lang.Override
|
||
|
|
public HlcServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||
|
|
return new HlcServiceStub(channel, callOptions);
|
||
|
|
}
|
||
|
|
};
|
||
|
|
return HlcServiceStub.newStub(factory, channel);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||
|
|
*/
|
||
|
|
public static HlcServiceBlockingStub newBlockingStub(
|
||
|
|
io.grpc.Channel channel) {
|
||
|
|
io.grpc.stub.AbstractStub.StubFactory<HlcServiceBlockingStub> factory =
|
||
|
|
new io.grpc.stub.AbstractStub.StubFactory<HlcServiceBlockingStub>() {
|
||
|
|
@java.lang.Override
|
||
|
|
public HlcServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||
|
|
return new HlcServiceBlockingStub(channel, callOptions);
|
||
|
|
}
|
||
|
|
};
|
||
|
|
return HlcServiceBlockingStub.newStub(factory, channel);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates a new ListenableFuture-style stub that supports unary calls on the service
|
||
|
|
*/
|
||
|
|
public static HlcServiceFutureStub newFutureStub(
|
||
|
|
io.grpc.Channel channel) {
|
||
|
|
io.grpc.stub.AbstractStub.StubFactory<HlcServiceFutureStub> factory =
|
||
|
|
new io.grpc.stub.AbstractStub.StubFactory<HlcServiceFutureStub>() {
|
||
|
|
@java.lang.Override
|
||
|
|
public HlcServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||
|
|
return new HlcServiceFutureStub(channel, callOptions);
|
||
|
|
}
|
||
|
|
};
|
||
|
|
return HlcServiceFutureStub.newStub(factory, channel);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
public static abstract class HlcServiceImplBase implements io.grpc.BindableService {
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
public void touch(cmvr.api.HlcCommand.Touch.Request request,
|
||
|
|
io.grpc.stub.StreamObserver<cmvr.api.HlcCommand.Touch.Response> responseObserver) {
|
||
|
|
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTouchMethod(), responseObserver);
|
||
|
|
}
|
||
|
|
|
||
|
|
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
||
|
|
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||
|
|
.addMethod(
|
||
|
|
getTouchMethod(),
|
||
|
|
io.grpc.stub.ServerCalls.asyncUnaryCall(
|
||
|
|
new MethodHandlers<
|
||
|
|
cmvr.api.HlcCommand.Touch.Request,
|
||
|
|
cmvr.api.HlcCommand.Touch.Response>(
|
||
|
|
this, METHODID_TOUCH)))
|
||
|
|
.build();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
public static final class HlcServiceStub extends io.grpc.stub.AbstractAsyncStub<HlcServiceStub> {
|
||
|
|
private HlcServiceStub(
|
||
|
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||
|
|
super(channel, callOptions);
|
||
|
|
}
|
||
|
|
|
||
|
|
@java.lang.Override
|
||
|
|
protected HlcServiceStub build(
|
||
|
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||
|
|
return new HlcServiceStub(channel, callOptions);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
public void touch(cmvr.api.HlcCommand.Touch.Request request,
|
||
|
|
io.grpc.stub.StreamObserver<cmvr.api.HlcCommand.Touch.Response> responseObserver) {
|
||
|
|
io.grpc.stub.ClientCalls.asyncUnaryCall(
|
||
|
|
getChannel().newCall(getTouchMethod(), getCallOptions()), request, responseObserver);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
public static final class HlcServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<HlcServiceBlockingStub> {
|
||
|
|
private HlcServiceBlockingStub(
|
||
|
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||
|
|
super(channel, callOptions);
|
||
|
|
}
|
||
|
|
|
||
|
|
@java.lang.Override
|
||
|
|
protected HlcServiceBlockingStub build(
|
||
|
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||
|
|
return new HlcServiceBlockingStub(channel, callOptions);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
public cmvr.api.HlcCommand.Touch.Response touch(cmvr.api.HlcCommand.Touch.Request request) {
|
||
|
|
return io.grpc.stub.ClientCalls.blockingUnaryCall(
|
||
|
|
getChannel(), getTouchMethod(), getCallOptions(), request);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
public static final class HlcServiceFutureStub extends io.grpc.stub.AbstractFutureStub<HlcServiceFutureStub> {
|
||
|
|
private HlcServiceFutureStub(
|
||
|
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||
|
|
super(channel, callOptions);
|
||
|
|
}
|
||
|
|
|
||
|
|
@java.lang.Override
|
||
|
|
protected HlcServiceFutureStub build(
|
||
|
|
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
|
||
|
|
return new HlcServiceFutureStub(channel, callOptions);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
*/
|
||
|
|
public com.google.common.util.concurrent.ListenableFuture<cmvr.api.HlcCommand.Touch.Response> touch(
|
||
|
|
cmvr.api.HlcCommand.Touch.Request request) {
|
||
|
|
return io.grpc.stub.ClientCalls.futureUnaryCall(
|
||
|
|
getChannel().newCall(getTouchMethod(), getCallOptions()), request);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private static final int METHODID_TOUCH = 0;
|
||
|
|
|
||
|
|
private static final class MethodHandlers<Req, Resp> implements
|
||
|
|
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||
|
|
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||
|
|
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||
|
|
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||
|
|
private final HlcServiceImplBase serviceImpl;
|
||
|
|
private final int methodId;
|
||
|
|
|
||
|
|
MethodHandlers(HlcServiceImplBase 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<Resp> responseObserver) {
|
||
|
|
switch (methodId) {
|
||
|
|
case METHODID_TOUCH:
|
||
|
|
serviceImpl.touch((cmvr.api.HlcCommand.Touch.Request) request,
|
||
|
|
(io.grpc.stub.StreamObserver<cmvr.api.HlcCommand.Touch.Response>) responseObserver);
|
||
|
|
break;
|
||
|
|
default:
|
||
|
|
throw new AssertionError();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
@java.lang.Override
|
||
|
|
@java.lang.SuppressWarnings("unchecked")
|
||
|
|
public io.grpc.stub.StreamObserver<Req> invoke(
|
||
|
|
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||
|
|
switch (methodId) {
|
||
|
|
default:
|
||
|
|
throw new AssertionError();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private static abstract class HlcServiceBaseDescriptorSupplier
|
||
|
|
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
|
||
|
|
HlcServiceBaseDescriptorSupplier() {}
|
||
|
|
|
||
|
|
@java.lang.Override
|
||
|
|
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
|
||
|
|
return cmvr.api.HlcServiceOuterClass.getDescriptor();
|
||
|
|
}
|
||
|
|
|
||
|
|
@java.lang.Override
|
||
|
|
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
|
||
|
|
return getFileDescriptor().findServiceByName("HlcService");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
private static final class HlcServiceFileDescriptorSupplier
|
||
|
|
extends HlcServiceBaseDescriptorSupplier {
|
||
|
|
HlcServiceFileDescriptorSupplier() {}
|
||
|
|
}
|
||
|
|
|
||
|
|
private static final class HlcServiceMethodDescriptorSupplier
|
||
|
|
extends HlcServiceBaseDescriptorSupplier
|
||
|
|
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
|
||
|
|
private final String methodName;
|
||
|
|
|
||
|
|
HlcServiceMethodDescriptorSupplier(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 (HlcServiceGrpc.class) {
|
||
|
|
result = serviceDescriptor;
|
||
|
|
if (result == null) {
|
||
|
|
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||
|
|
.setSchemaDescriptor(new HlcServiceFileDescriptorSupplier())
|
||
|
|
.addMethod(getTouchMethod())
|
||
|
|
.build();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
}
|