com.exactpro.th2.act.grpc.hand.RhBatchGrpc Maven / Gradle / Ivy
package com.exactpro.th2.act.grpc.hand;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.39.0)",
comments = "Source: th2_grpc_hand/rhbatch.proto")
public final class RhBatchGrpc {
private RhBatchGrpc() {}
public static final String SERVICE_NAME = "RhBatch";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getRegisterMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "register",
requestType = com.exactpro.th2.act.grpc.hand.RhTargetServer.class,
responseType = com.exactpro.th2.act.grpc.hand.RhSessionID.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getRegisterMethod() {
io.grpc.MethodDescriptor getRegisterMethod;
if ((getRegisterMethod = RhBatchGrpc.getRegisterMethod) == null) {
synchronized (RhBatchGrpc.class) {
if ((getRegisterMethod = RhBatchGrpc.getRegisterMethod) == null) {
RhBatchGrpc.getRegisterMethod = getRegisterMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "register"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.exactpro.th2.act.grpc.hand.RhTargetServer.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.exactpro.th2.act.grpc.hand.RhSessionID.getDefaultInstance()))
.setSchemaDescriptor(new RhBatchMethodDescriptorSupplier("register"))
.build();
}
}
}
return getRegisterMethod;
}
private static volatile io.grpc.MethodDescriptor getUnregisterMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "unregister",
requestType = com.exactpro.th2.act.grpc.hand.RhSessionID.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getUnregisterMethod() {
io.grpc.MethodDescriptor getUnregisterMethod;
if ((getUnregisterMethod = RhBatchGrpc.getUnregisterMethod) == null) {
synchronized (RhBatchGrpc.class) {
if ((getUnregisterMethod = RhBatchGrpc.getUnregisterMethod) == null) {
RhBatchGrpc.getUnregisterMethod = getUnregisterMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "unregister"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.exactpro.th2.act.grpc.hand.RhSessionID.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(new RhBatchMethodDescriptorSupplier("unregister"))
.build();
}
}
}
return getUnregisterMethod;
}
private static volatile io.grpc.MethodDescriptor getExecuteRhActionsBatchMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "executeRhActionsBatch",
requestType = com.exactpro.th2.act.grpc.hand.RhActionsBatch.class,
responseType = com.exactpro.th2.act.grpc.hand.RhBatchResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getExecuteRhActionsBatchMethod() {
io.grpc.MethodDescriptor getExecuteRhActionsBatchMethod;
if ((getExecuteRhActionsBatchMethod = RhBatchGrpc.getExecuteRhActionsBatchMethod) == null) {
synchronized (RhBatchGrpc.class) {
if ((getExecuteRhActionsBatchMethod = RhBatchGrpc.getExecuteRhActionsBatchMethod) == null) {
RhBatchGrpc.getExecuteRhActionsBatchMethod = getExecuteRhActionsBatchMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "executeRhActionsBatch"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.exactpro.th2.act.grpc.hand.RhActionsBatch.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.exactpro.th2.act.grpc.hand.RhBatchResponse.getDefaultInstance()))
.setSchemaDescriptor(new RhBatchMethodDescriptorSupplier("executeRhActionsBatch"))
.build();
}
}
}
return getExecuteRhActionsBatchMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static RhBatchStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RhBatchStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RhBatchStub(channel, callOptions);
}
};
return RhBatchStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static RhBatchBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RhBatchBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RhBatchBlockingStub(channel, callOptions);
}
};
return RhBatchBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static RhBatchFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public RhBatchFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RhBatchFutureStub(channel, callOptions);
}
};
return RhBatchFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class RhBatchImplBase implements io.grpc.BindableService {
/**
*/
public void register(com.exactpro.th2.act.grpc.hand.RhTargetServer request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRegisterMethod(), responseObserver);
}
/**
*/
public void unregister(com.exactpro.th2.act.grpc.hand.RhSessionID request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnregisterMethod(), responseObserver);
}
/**
*/
public void executeRhActionsBatch(com.exactpro.th2.act.grpc.hand.RhActionsBatch request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExecuteRhActionsBatchMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getRegisterMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.exactpro.th2.act.grpc.hand.RhTargetServer,
com.exactpro.th2.act.grpc.hand.RhSessionID>(
this, METHODID_REGISTER)))
.addMethod(
getUnregisterMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.exactpro.th2.act.grpc.hand.RhSessionID,
com.google.protobuf.Empty>(
this, METHODID_UNREGISTER)))
.addMethod(
getExecuteRhActionsBatchMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.exactpro.th2.act.grpc.hand.RhActionsBatch,
com.exactpro.th2.act.grpc.hand.RhBatchResponse>(
this, METHODID_EXECUTE_RH_ACTIONS_BATCH)))
.build();
}
}
/**
*/
public static final class RhBatchStub extends io.grpc.stub.AbstractAsyncStub {
private RhBatchStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RhBatchStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RhBatchStub(channel, callOptions);
}
/**
*/
public void register(com.exactpro.th2.act.grpc.hand.RhTargetServer request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getRegisterMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void unregister(com.exactpro.th2.act.grpc.hand.RhSessionID request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUnregisterMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void executeRhActionsBatch(com.exactpro.th2.act.grpc.hand.RhActionsBatch request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getExecuteRhActionsBatchMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class RhBatchBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private RhBatchBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RhBatchBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RhBatchBlockingStub(channel, callOptions);
}
/**
*/
public com.exactpro.th2.act.grpc.hand.RhSessionID register(com.exactpro.th2.act.grpc.hand.RhTargetServer request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getRegisterMethod(), getCallOptions(), request);
}
/**
*/
public com.google.protobuf.Empty unregister(com.exactpro.th2.act.grpc.hand.RhSessionID request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUnregisterMethod(), getCallOptions(), request);
}
/**
*/
public com.exactpro.th2.act.grpc.hand.RhBatchResponse executeRhActionsBatch(com.exactpro.th2.act.grpc.hand.RhActionsBatch request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getExecuteRhActionsBatchMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class RhBatchFutureStub extends io.grpc.stub.AbstractFutureStub {
private RhBatchFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected RhBatchFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new RhBatchFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture register(
com.exactpro.th2.act.grpc.hand.RhTargetServer request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getRegisterMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture unregister(
com.exactpro.th2.act.grpc.hand.RhSessionID request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUnregisterMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture executeRhActionsBatch(
com.exactpro.th2.act.grpc.hand.RhActionsBatch request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getExecuteRhActionsBatchMethod(), getCallOptions()), request);
}
}
private static final int METHODID_REGISTER = 0;
private static final int METHODID_UNREGISTER = 1;
private static final int METHODID_EXECUTE_RH_ACTIONS_BATCH = 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 RhBatchImplBase serviceImpl;
private final int methodId;
MethodHandlers(RhBatchImplBase 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_REGISTER:
serviceImpl.register((com.exactpro.th2.act.grpc.hand.RhTargetServer) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UNREGISTER:
serviceImpl.unregister((com.exactpro.th2.act.grpc.hand.RhSessionID) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXECUTE_RH_ACTIONS_BATCH:
serviceImpl.executeRhActionsBatch((com.exactpro.th2.act.grpc.hand.RhActionsBatch) 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 RhBatchBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
RhBatchBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.exactpro.th2.act.grpc.hand.Rhbatch.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("RhBatch");
}
}
private static final class RhBatchFileDescriptorSupplier
extends RhBatchBaseDescriptorSupplier {
RhBatchFileDescriptorSupplier() {}
}
private static final class RhBatchMethodDescriptorSupplier
extends RhBatchBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
RhBatchMethodDescriptorSupplier(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 (RhBatchGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new RhBatchFileDescriptorSupplier())
.addMethod(getRegisterMethod())
.addMethod(getUnregisterMethod())
.addMethod(getExecuteRhActionsBatchMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy