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

org.hyperledger.fabric.protos.peer.DeliverGrpc Maven / Gradle / Ivy

package org.hyperledger.fabric.protos.peer;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.68.0)",
    comments = "Source: peer/events.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class DeliverGrpc {

  private DeliverGrpc() {}

  public static final java.lang.String SERVICE_NAME = "protos.Deliver";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor getDeliverMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Deliver",
      requestType = org.hyperledger.fabric.protos.common.Envelope.class,
      responseType = org.hyperledger.fabric.protos.peer.DeliverResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getDeliverMethod() {
    io.grpc.MethodDescriptor getDeliverMethod;
    if ((getDeliverMethod = DeliverGrpc.getDeliverMethod) == null) {
      synchronized (DeliverGrpc.class) {
        if ((getDeliverMethod = DeliverGrpc.getDeliverMethod) == null) {
          DeliverGrpc.getDeliverMethod = getDeliverMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Deliver"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.hyperledger.fabric.protos.common.Envelope.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.hyperledger.fabric.protos.peer.DeliverResponse.getDefaultInstance()))
              .setSchemaDescriptor(new DeliverMethodDescriptorSupplier("Deliver"))
              .build();
        }
      }
    }
    return getDeliverMethod;
  }

  private static volatile io.grpc.MethodDescriptor getDeliverFilteredMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "DeliverFiltered",
      requestType = org.hyperledger.fabric.protos.common.Envelope.class,
      responseType = org.hyperledger.fabric.protos.peer.DeliverResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getDeliverFilteredMethod() {
    io.grpc.MethodDescriptor getDeliverFilteredMethod;
    if ((getDeliverFilteredMethod = DeliverGrpc.getDeliverFilteredMethod) == null) {
      synchronized (DeliverGrpc.class) {
        if ((getDeliverFilteredMethod = DeliverGrpc.getDeliverFilteredMethod) == null) {
          DeliverGrpc.getDeliverFilteredMethod = getDeliverFilteredMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeliverFiltered"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.hyperledger.fabric.protos.common.Envelope.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.hyperledger.fabric.protos.peer.DeliverResponse.getDefaultInstance()))
              .setSchemaDescriptor(new DeliverMethodDescriptorSupplier("DeliverFiltered"))
              .build();
        }
      }
    }
    return getDeliverFilteredMethod;
  }

  private static volatile io.grpc.MethodDescriptor getDeliverWithPrivateDataMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "DeliverWithPrivateData",
      requestType = org.hyperledger.fabric.protos.common.Envelope.class,
      responseType = org.hyperledger.fabric.protos.peer.DeliverResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getDeliverWithPrivateDataMethod() {
    io.grpc.MethodDescriptor getDeliverWithPrivateDataMethod;
    if ((getDeliverWithPrivateDataMethod = DeliverGrpc.getDeliverWithPrivateDataMethod) == null) {
      synchronized (DeliverGrpc.class) {
        if ((getDeliverWithPrivateDataMethod = DeliverGrpc.getDeliverWithPrivateDataMethod) == null) {
          DeliverGrpc.getDeliverWithPrivateDataMethod = getDeliverWithPrivateDataMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeliverWithPrivateData"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.hyperledger.fabric.protos.common.Envelope.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  org.hyperledger.fabric.protos.peer.DeliverResponse.getDefaultInstance()))
              .setSchemaDescriptor(new DeliverMethodDescriptorSupplier("DeliverWithPrivateData"))
              .build();
        }
      }
    }
    return getDeliverWithPrivateDataMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static DeliverStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public DeliverStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new DeliverStub(channel, callOptions);
        }
      };
    return DeliverStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static DeliverBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public DeliverBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new DeliverBlockingStub(channel, callOptions);
        }
      };
    return DeliverBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static DeliverFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public DeliverFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new DeliverFutureStub(channel, callOptions);
        }
      };
    return DeliverFutureStub.newStub(factory, channel);
  }

  /**
   */
  public interface AsyncService {

    /**
     * 
     * Deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with
     * Payload data as a marshaled orderer.SeekInfo message,
     * then a stream of block replies is received
     * 
*/ default io.grpc.stub.StreamObserver deliver( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getDeliverMethod(), responseObserver); } /** *
     * DeliverFiltered first requires an Envelope of type ab.DELIVER_SEEK_INFO with
     * Payload data as a marshaled orderer.SeekInfo message,
     * then a stream of **filtered** block replies is received
     * 
*/ default io.grpc.stub.StreamObserver deliverFiltered( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getDeliverFilteredMethod(), responseObserver); } /** *
     * DeliverWithPrivateData first requires an Envelope of type ab.DELIVER_SEEK_INFO with
     * Payload data as a marshaled orderer.SeekInfo message,
     * then a stream of block and private data replies is received
     * 
*/ default io.grpc.stub.StreamObserver deliverWithPrivateData( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getDeliverWithPrivateDataMethod(), responseObserver); } } /** * Base class for the server implementation of the service Deliver. */ public static abstract class DeliverImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return DeliverGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Deliver. */ public static final class DeliverStub extends io.grpc.stub.AbstractAsyncStub { private DeliverStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected DeliverStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DeliverStub(channel, callOptions); } /** *
     * Deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with
     * Payload data as a marshaled orderer.SeekInfo message,
     * then a stream of block replies is received
     * 
*/ public io.grpc.stub.StreamObserver deliver( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getDeliverMethod(), getCallOptions()), responseObserver); } /** *
     * DeliverFiltered first requires an Envelope of type ab.DELIVER_SEEK_INFO with
     * Payload data as a marshaled orderer.SeekInfo message,
     * then a stream of **filtered** block replies is received
     * 
*/ public io.grpc.stub.StreamObserver deliverFiltered( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getDeliverFilteredMethod(), getCallOptions()), responseObserver); } /** *
     * DeliverWithPrivateData first requires an Envelope of type ab.DELIVER_SEEK_INFO with
     * Payload data as a marshaled orderer.SeekInfo message,
     * then a stream of block and private data replies is received
     * 
*/ public io.grpc.stub.StreamObserver deliverWithPrivateData( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getDeliverWithPrivateDataMethod(), getCallOptions()), responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service Deliver. */ public static final class DeliverBlockingStub extends io.grpc.stub.AbstractBlockingStub { private DeliverBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected DeliverBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DeliverBlockingStub(channel, callOptions); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Deliver. */ public static final class DeliverFutureStub extends io.grpc.stub.AbstractFutureStub { private DeliverFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected DeliverFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DeliverFutureStub(channel, callOptions); } } private static final int METHODID_DELIVER = 0; private static final int METHODID_DELIVER_FILTERED = 1; private static final int METHODID_DELIVER_WITH_PRIVATE_DATA = 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 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) { default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_DELIVER: return (io.grpc.stub.StreamObserver) serviceImpl.deliver( (io.grpc.stub.StreamObserver) responseObserver); case METHODID_DELIVER_FILTERED: return (io.grpc.stub.StreamObserver) serviceImpl.deliverFiltered( (io.grpc.stub.StreamObserver) responseObserver); case METHODID_DELIVER_WITH_PRIVATE_DATA: return (io.grpc.stub.StreamObserver) serviceImpl.deliverWithPrivateData( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getDeliverMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.common.Envelope, org.hyperledger.fabric.protos.peer.DeliverResponse>( service, METHODID_DELIVER))) .addMethod( getDeliverFilteredMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.common.Envelope, org.hyperledger.fabric.protos.peer.DeliverResponse>( service, METHODID_DELIVER_FILTERED))) .addMethod( getDeliverWithPrivateDataMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.common.Envelope, org.hyperledger.fabric.protos.peer.DeliverResponse>( service, METHODID_DELIVER_WITH_PRIVATE_DATA))) .build(); } private static abstract class DeliverBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { DeliverBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return org.hyperledger.fabric.protos.peer.EventsProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Deliver"); } } private static final class DeliverFileDescriptorSupplier extends DeliverBaseDescriptorSupplier { DeliverFileDescriptorSupplier() {} } private static final class DeliverMethodDescriptorSupplier extends DeliverBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; DeliverMethodDescriptorSupplier(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 (DeliverGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new DeliverFileDescriptorSupplier()) .addMethod(getDeliverMethod()) .addMethod(getDeliverFilteredMethod()) .addMethod(getDeliverWithPrivateDataMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy