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/humanoid_robot.proto") @io.grpc.stub.annotations.GrpcGenerated public final class HumanoidRobotServiceGrpc { private HumanoidRobotServiceGrpc() {} public static final String SERVICE_NAME = "cmvr.api.HumanoidRobotService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getTorqueOffMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "torqueOff", requestType = cmvr.api.Common.CommandHeader.Request.class, responseType = cmvr.api.Common.CommandHeader.Feedback.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getTorqueOffMethod() { io.grpc.MethodDescriptor getTorqueOffMethod; if ((getTorqueOffMethod = HumanoidRobotServiceGrpc.getTorqueOffMethod) == null) { synchronized (HumanoidRobotServiceGrpc.class) { if ((getTorqueOffMethod = HumanoidRobotServiceGrpc.getTorqueOffMethod) == null) { HumanoidRobotServiceGrpc.getTorqueOffMethod = getTorqueOffMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "torqueOff")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( cmvr.api.Common.CommandHeader.Request.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( cmvr.api.Common.CommandHeader.Feedback.getDefaultInstance())) .setSchemaDescriptor(new HumanoidRobotServiceMethodDescriptorSupplier("torqueOff")) .build(); } } } return getTorqueOffMethod; } private static volatile io.grpc.MethodDescriptor getTorqueOnMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "torqueOn", requestType = cmvr.api.Common.CommandHeader.Request.class, responseType = cmvr.api.Common.CommandHeader.Feedback.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getTorqueOnMethod() { io.grpc.MethodDescriptor getTorqueOnMethod; if ((getTorqueOnMethod = HumanoidRobotServiceGrpc.getTorqueOnMethod) == null) { synchronized (HumanoidRobotServiceGrpc.class) { if ((getTorqueOnMethod = HumanoidRobotServiceGrpc.getTorqueOnMethod) == null) { HumanoidRobotServiceGrpc.getTorqueOnMethod = getTorqueOnMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "torqueOn")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( cmvr.api.Common.CommandHeader.Request.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( cmvr.api.Common.CommandHeader.Feedback.getDefaultInstance())) .setSchemaDescriptor(new HumanoidRobotServiceMethodDescriptorSupplier("torqueOn")) .build(); } } } return getTorqueOnMethod; } private static volatile io.grpc.MethodDescriptor getMoveJMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "moveJ", requestType = cmvr.api.HumanoidRobot.MoveJ.Request.class, responseType = cmvr.api.HumanoidRobot.MoveJ.Response.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getMoveJMethod() { io.grpc.MethodDescriptor getMoveJMethod; if ((getMoveJMethod = HumanoidRobotServiceGrpc.getMoveJMethod) == null) { synchronized (HumanoidRobotServiceGrpc.class) { if ((getMoveJMethod = HumanoidRobotServiceGrpc.getMoveJMethod) == null) { HumanoidRobotServiceGrpc.getMoveJMethod = getMoveJMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "moveJ")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( cmvr.api.HumanoidRobot.MoveJ.Request.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( cmvr.api.HumanoidRobot.MoveJ.Response.getDefaultInstance())) .setSchemaDescriptor(new HumanoidRobotServiceMethodDescriptorSupplier("moveJ")) .build(); } } } return getMoveJMethod; } /** * Creates a new async stub that supports all call types for the service */ public static HumanoidRobotServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public HumanoidRobotServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new HumanoidRobotServiceStub(channel, callOptions); } }; return HumanoidRobotServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static HumanoidRobotServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public HumanoidRobotServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new HumanoidRobotServiceBlockingStub(channel, callOptions); } }; return HumanoidRobotServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static HumanoidRobotServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public HumanoidRobotServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new HumanoidRobotServiceFutureStub(channel, callOptions); } }; return HumanoidRobotServiceFutureStub.newStub(factory, channel); } /** */ public static abstract class HumanoidRobotServiceImplBase implements io.grpc.BindableService { /** */ public void torqueOff(cmvr.api.Common.CommandHeader.Request request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTorqueOffMethod(), responseObserver); } /** */ public void torqueOn(cmvr.api.Common.CommandHeader.Request request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTorqueOnMethod(), responseObserver); } /** */ public void moveJ(cmvr.api.HumanoidRobot.MoveJ.Request request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMoveJMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getTorqueOffMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< cmvr.api.Common.CommandHeader.Request, cmvr.api.Common.CommandHeader.Feedback>( this, METHODID_TORQUE_OFF))) .addMethod( getTorqueOnMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< cmvr.api.Common.CommandHeader.Request, cmvr.api.Common.CommandHeader.Feedback>( this, METHODID_TORQUE_ON))) .addMethod( getMoveJMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< cmvr.api.HumanoidRobot.MoveJ.Request, cmvr.api.HumanoidRobot.MoveJ.Response>( this, METHODID_MOVE_J))) .build(); } } /** */ public static final class HumanoidRobotServiceStub extends io.grpc.stub.AbstractAsyncStub { private HumanoidRobotServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected HumanoidRobotServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new HumanoidRobotServiceStub(channel, callOptions); } /** */ public void torqueOff(cmvr.api.Common.CommandHeader.Request request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getTorqueOffMethod(), getCallOptions()), request, responseObserver); } /** */ public void torqueOn(cmvr.api.Common.CommandHeader.Request request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getTorqueOnMethod(), getCallOptions()), request, responseObserver); } /** */ public void moveJ(cmvr.api.HumanoidRobot.MoveJ.Request request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getMoveJMethod(), getCallOptions()), request, responseObserver); } } /** */ public static final class HumanoidRobotServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private HumanoidRobotServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected HumanoidRobotServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new HumanoidRobotServiceBlockingStub(channel, callOptions); } /** */ public cmvr.api.Common.CommandHeader.Feedback torqueOff(cmvr.api.Common.CommandHeader.Request request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getTorqueOffMethod(), getCallOptions(), request); } /** */ public cmvr.api.Common.CommandHeader.Feedback torqueOn(cmvr.api.Common.CommandHeader.Request request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getTorqueOnMethod(), getCallOptions(), request); } /** */ public cmvr.api.HumanoidRobot.MoveJ.Response moveJ(cmvr.api.HumanoidRobot.MoveJ.Request request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getMoveJMethod(), getCallOptions(), request); } } /** */ public static final class HumanoidRobotServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private HumanoidRobotServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected HumanoidRobotServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new HumanoidRobotServiceFutureStub(channel, callOptions); } /** */ public com.google.common.util.concurrent.ListenableFuture torqueOff( cmvr.api.Common.CommandHeader.Request request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getTorqueOffMethod(), getCallOptions()), request); } /** */ public com.google.common.util.concurrent.ListenableFuture torqueOn( cmvr.api.Common.CommandHeader.Request request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getTorqueOnMethod(), getCallOptions()), request); } /** */ public com.google.common.util.concurrent.ListenableFuture moveJ( cmvr.api.HumanoidRobot.MoveJ.Request request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getMoveJMethod(), getCallOptions()), request); } } private static final int METHODID_TORQUE_OFF = 0; private static final int METHODID_TORQUE_ON = 1; private static final int METHODID_MOVE_J = 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 HumanoidRobotServiceImplBase serviceImpl; private final int methodId; MethodHandlers(HumanoidRobotServiceImplBase 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_TORQUE_OFF: serviceImpl.torqueOff((cmvr.api.Common.CommandHeader.Request) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_TORQUE_ON: serviceImpl.torqueOn((cmvr.api.Common.CommandHeader.Request) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_MOVE_J: serviceImpl.moveJ((cmvr.api.HumanoidRobot.MoveJ.Request) 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 HumanoidRobotServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { HumanoidRobotServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return cmvr.api.HumanoidRobot.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("HumanoidRobotService"); } } private static final class HumanoidRobotServiceFileDescriptorSupplier extends HumanoidRobotServiceBaseDescriptorSupplier { HumanoidRobotServiceFileDescriptorSupplier() {} } private static final class HumanoidRobotServiceMethodDescriptorSupplier extends HumanoidRobotServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; HumanoidRobotServiceMethodDescriptorSupplier(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 (HumanoidRobotServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new HumanoidRobotServiceFileDescriptorSupplier()) .addMethod(getTorqueOffMethod()) .addMethod(getTorqueOnMethod()) .addMethod(getMoveJMethod()) .build(); } } } return result; } }