jvmMain.terra.tx.v1beta1.ServiceGrpc Maven / Gradle / Ivy
package terra.tx.v1beta1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Service defines a gRPC service for interacting with transactions.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.63.0)",
comments = "Source: terra/tx/v1beta1/service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ServiceGrpc {
private ServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "terra.tx.v1beta1.Service";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getComputeTaxMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ComputeTax",
requestType = terra.tx.v1beta1.ServiceOuterClass.ComputeTaxRequest.class,
responseType = terra.tx.v1beta1.ServiceOuterClass.ComputeTaxResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getComputeTaxMethod() {
io.grpc.MethodDescriptor getComputeTaxMethod;
if ((getComputeTaxMethod = ServiceGrpc.getComputeTaxMethod) == null) {
synchronized (ServiceGrpc.class) {
if ((getComputeTaxMethod = ServiceGrpc.getComputeTaxMethod) == null) {
ServiceGrpc.getComputeTaxMethod = getComputeTaxMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ComputeTax"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
terra.tx.v1beta1.ServiceOuterClass.ComputeTaxRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
terra.tx.v1beta1.ServiceOuterClass.ComputeTaxResponse.getDefaultInstance()))
.setSchemaDescriptor(new ServiceMethodDescriptorSupplier("ComputeTax"))
.build();
}
}
}
return getComputeTaxMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ServiceStub(channel, callOptions);
}
};
return ServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ServiceBlockingStub(channel, callOptions);
}
};
return ServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ServiceFutureStub(channel, callOptions);
}
};
return ServiceFutureStub.newStub(factory, channel);
}
/**
*
* Service defines a gRPC service for interacting with transactions.
*
*/
public interface AsyncService {
/**
*
* EstimateFee simulates executing a transaction for estimating gas usage.
*
*/
default void computeTax(terra.tx.v1beta1.ServiceOuterClass.ComputeTaxRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getComputeTaxMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service Service.
*
* Service defines a gRPC service for interacting with transactions.
*
*/
public static abstract class ServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return ServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service Service.
*
* Service defines a gRPC service for interacting with transactions.
*
*/
public static final class ServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private ServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ServiceStub(channel, callOptions);
}
/**
*
* EstimateFee simulates executing a transaction for estimating gas usage.
*
*/
public void computeTax(terra.tx.v1beta1.ServiceOuterClass.ComputeTaxRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getComputeTaxMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service Service.
*
* Service defines a gRPC service for interacting with transactions.
*
*/
public static final class ServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private ServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ServiceBlockingStub(channel, callOptions);
}
/**
*
* EstimateFee simulates executing a transaction for estimating gas usage.
*
*/
public terra.tx.v1beta1.ServiceOuterClass.ComputeTaxResponse computeTax(terra.tx.v1beta1.ServiceOuterClass.ComputeTaxRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getComputeTaxMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service Service.
*
* Service defines a gRPC service for interacting with transactions.
*
*/
public static final class ServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private ServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ServiceFutureStub(channel, callOptions);
}
/**
*
* EstimateFee simulates executing a transaction for estimating gas usage.
*
*/
public com.google.common.util.concurrent.ListenableFuture computeTax(
terra.tx.v1beta1.ServiceOuterClass.ComputeTaxRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getComputeTaxMethod(), getCallOptions()), request);
}
}
private static final int METHODID_COMPUTE_TAX = 0;
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_COMPUTE_TAX:
serviceImpl.computeTax((terra.tx.v1beta1.ServiceOuterClass.ComputeTaxRequest) 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();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getComputeTaxMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
terra.tx.v1beta1.ServiceOuterClass.ComputeTaxRequest,
terra.tx.v1beta1.ServiceOuterClass.ComputeTaxResponse>(
service, METHODID_COMPUTE_TAX)))
.build();
}
private static abstract class ServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return terra.tx.v1beta1.ServiceOuterClass.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("Service");
}
}
private static final class ServiceFileDescriptorSupplier
extends ServiceBaseDescriptorSupplier {
ServiceFileDescriptorSupplier() {}
}
private static final class ServiceMethodDescriptorSupplier
extends ServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
ServiceMethodDescriptorSupplier(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 (ServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ServiceFileDescriptorSupplier())
.addMethod(getComputeTaxMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy