All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hederahashgraph.service.proto.java.UtilServiceGrpc Maven / Gradle / Ivy

There is a newer version: 0.57.1
Show newest version
package com.hederahashgraph.service.proto.java;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 **
 * The requests and responses for different utility services.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.45.1)", comments = "Source: util_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class UtilServiceGrpc { private UtilServiceGrpc() {} public static final String SERVICE_NAME = "proto.UtilService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getPrngMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "prng", requestType = com.hederahashgraph.api.proto.java.Transaction.class, responseType = com.hederahashgraph.api.proto.java.TransactionResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getPrngMethod() { io.grpc.MethodDescriptor getPrngMethod; if ((getPrngMethod = UtilServiceGrpc.getPrngMethod) == null) { synchronized (UtilServiceGrpc.class) { if ((getPrngMethod = UtilServiceGrpc.getPrngMethod) == null) { UtilServiceGrpc.getPrngMethod = getPrngMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "prng")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.hederahashgraph.api.proto.java.Transaction.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.hederahashgraph.api.proto.java.TransactionResponse.getDefaultInstance())) .setSchemaDescriptor(new UtilServiceMethodDescriptorSupplier("prng")) .build(); } } } return getPrngMethod; } /** * Creates a new async stub that supports all call types for the service */ public static UtilServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public UtilServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UtilServiceStub(channel, callOptions); } }; return UtilServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static UtilServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public UtilServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UtilServiceBlockingStub(channel, callOptions); } }; return UtilServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static UtilServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public UtilServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UtilServiceFutureStub(channel, callOptions); } }; return UtilServiceFutureStub.newStub(factory, channel); } /** *
   **
   * The requests and responses for different utility services.
   * 
*/ public static abstract class UtilServiceImplBase implements io.grpc.BindableService { /** *
     **
     * Generates a pseudorandom number.
     * 
*/ public void prng(com.hederahashgraph.api.proto.java.Transaction request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPrngMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getPrngMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.hederahashgraph.api.proto.java.Transaction, com.hederahashgraph.api.proto.java.TransactionResponse>( this, METHODID_PRNG))) .build(); } } /** *
   **
   * The requests and responses for different utility services.
   * 
*/ public static final class UtilServiceStub extends io.grpc.stub.AbstractAsyncStub { private UtilServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected UtilServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UtilServiceStub(channel, callOptions); } /** *
     **
     * Generates a pseudorandom number.
     * 
*/ public void prng(com.hederahashgraph.api.proto.java.Transaction request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPrngMethod(), getCallOptions()), request, responseObserver); } } /** *
   **
   * The requests and responses for different utility services.
   * 
*/ public static final class UtilServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private UtilServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected UtilServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UtilServiceBlockingStub(channel, callOptions); } /** *
     **
     * Generates a pseudorandom number.
     * 
*/ public com.hederahashgraph.api.proto.java.TransactionResponse prng(com.hederahashgraph.api.proto.java.Transaction request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPrngMethod(), getCallOptions(), request); } } /** *
   **
   * The requests and responses for different utility services.
   * 
*/ public static final class UtilServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private UtilServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected UtilServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new UtilServiceFutureStub(channel, callOptions); } /** *
     **
     * Generates a pseudorandom number.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture prng( com.hederahashgraph.api.proto.java.Transaction request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPrngMethod(), getCallOptions()), request); } } private static final int METHODID_PRNG = 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 UtilServiceImplBase serviceImpl; private final int methodId; MethodHandlers(UtilServiceImplBase 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_PRNG: serviceImpl.prng((com.hederahashgraph.api.proto.java.Transaction) 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 UtilServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { UtilServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.hederahashgraph.service.proto.java.UtilServiceOuterClass.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("UtilService"); } } private static final class UtilServiceFileDescriptorSupplier extends UtilServiceBaseDescriptorSupplier { UtilServiceFileDescriptorSupplier() {} } private static final class UtilServiceMethodDescriptorSupplier extends UtilServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; UtilServiceMethodDescriptorSupplier(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 (UtilServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new UtilServiceFileDescriptorSupplier()) .addMethod(getPrngMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy