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

com.hedera.hashgraph.sdk.proto.UtilServiceGrpc Maven / Gradle / Ivy

There is a newer version: 2.39.0
Show newest version
package com.hedera.hashgraph.sdk.proto;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 **
 * The requests and responses for different utility services.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.50.2)", 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.hedera.hashgraph.sdk.proto.Transaction.class, responseType = com.hedera.hashgraph.sdk.proto.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.lite.ProtoLiteUtils.marshaller( com.hedera.hashgraph.sdk.proto.Transaction.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( com.hedera.hashgraph.sdk.proto.TransactionResponse.getDefaultInstance())) .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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.Transaction, com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.TransactionResponse prng(com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.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 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) .addMethod(getPrngMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy