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

com.hedera.hashgraph.sdk.proto.mirror.ConsensusServiceGrpc Maven / Gradle / Ivy

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

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 **
 * The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS)
 * messages for an HCS Topic via a specific (possibly open-ended) time range.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.50.2)", comments = "Source: mirror/consensus_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ConsensusServiceGrpc { private ConsensusServiceGrpc() {} public static final String SERVICE_NAME = "com.hedera.mirror.api.proto.ConsensusService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getSubscribeTopicMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "subscribeTopic", requestType = com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery.class, responseType = com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) public static io.grpc.MethodDescriptor getSubscribeTopicMethod() { io.grpc.MethodDescriptor getSubscribeTopicMethod; if ((getSubscribeTopicMethod = ConsensusServiceGrpc.getSubscribeTopicMethod) == null) { synchronized (ConsensusServiceGrpc.class) { if ((getSubscribeTopicMethod = ConsensusServiceGrpc.getSubscribeTopicMethod) == null) { ConsensusServiceGrpc.getSubscribeTopicMethod = getSubscribeTopicMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "subscribeTopic")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicResponse.getDefaultInstance())) .setSchemaDescriptor(new ConsensusServiceMethodDescriptorSupplier("subscribeTopic")) .build(); } } } return getSubscribeTopicMethod; } /** * Creates a new async stub that supports all call types for the service */ public static ConsensusServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ConsensusServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConsensusServiceStub(channel, callOptions); } }; return ConsensusServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static ConsensusServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ConsensusServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConsensusServiceBlockingStub(channel, callOptions); } }; return ConsensusServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static ConsensusServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ConsensusServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConsensusServiceFutureStub(channel, callOptions); } }; return ConsensusServiceFutureStub.newStub(factory, channel); } /** *
   **
   * The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS)
   * messages for an HCS Topic via a specific (possibly open-ended) time range.
   * 
*/ public static abstract class ConsensusServiceImplBase implements io.grpc.BindableService { /** */ public void subscribeTopic(com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSubscribeTopicMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getSubscribeTopicMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery, com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicResponse>( this, METHODID_SUBSCRIBE_TOPIC))) .build(); } } /** *
   **
   * The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS)
   * messages for an HCS Topic via a specific (possibly open-ended) time range.
   * 
*/ public static final class ConsensusServiceStub extends io.grpc.stub.AbstractAsyncStub { private ConsensusServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ConsensusServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConsensusServiceStub(channel, callOptions); } /** */ public void subscribeTopic(com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getSubscribeTopicMethod(), getCallOptions()), request, responseObserver); } } /** *
   **
   * The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS)
   * messages for an HCS Topic via a specific (possibly open-ended) time range.
   * 
*/ public static final class ConsensusServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private ConsensusServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ConsensusServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConsensusServiceBlockingStub(channel, callOptions); } /** */ public java.util.Iterator subscribeTopic( com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getSubscribeTopicMethod(), getCallOptions(), request); } } /** *
   **
   * The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS)
   * messages for an HCS Topic via a specific (possibly open-ended) time range.
   * 
*/ public static final class ConsensusServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private ConsensusServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ConsensusServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ConsensusServiceFutureStub(channel, callOptions); } } private static final int METHODID_SUBSCRIBE_TOPIC = 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 ConsensusServiceImplBase serviceImpl; private final int methodId; MethodHandlers(ConsensusServiceImplBase 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_SUBSCRIBE_TOPIC: serviceImpl.subscribeTopic((com.hedera.hashgraph.sdk.proto.mirror.ConsensusTopicQuery) 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 ConsensusServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ConsensusServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.hedera.hashgraph.sdk.proto.mirror.ConsensusServiceOuterClass.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("ConsensusService"); } } private static final class ConsensusServiceFileDescriptorSupplier extends ConsensusServiceBaseDescriptorSupplier { ConsensusServiceFileDescriptorSupplier() {} } private static final class ConsensusServiceMethodDescriptorSupplier extends ConsensusServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; ConsensusServiceMethodDescriptorSupplier(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 (ConsensusServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ConsensusServiceFileDescriptorSupplier()) .addMethod(getSubscribeTopicMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy