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

org.hyperledger.fabric.protos.orderer.AtomicBroadcastGrpc Maven / Gradle / Ivy

package org.hyperledger.fabric.protos.orderer;

import static io.grpc.MethodDescriptor.generateFullMethodName;

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

  private AtomicBroadcastGrpc() {}

  public static final java.lang.String SERVICE_NAME = "orderer.AtomicBroadcast";

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

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "Broadcast",
      requestType = org.hyperledger.fabric.protos.common.Envelope.class,
      responseType = org.hyperledger.fabric.protos.orderer.BroadcastResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getBroadcastMethod() {
    io.grpc.MethodDescriptor getBroadcastMethod;
    if ((getBroadcastMethod = AtomicBroadcastGrpc.getBroadcastMethod) == null) {
      synchronized (AtomicBroadcastGrpc.class) {
        if ((getBroadcastMethod = AtomicBroadcastGrpc.getBroadcastMethod) == null) {
          AtomicBroadcastGrpc.getBroadcastMethod = getBroadcastMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Broadcast"))
              .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.orderer.BroadcastResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AtomicBroadcastMethodDescriptorSupplier("Broadcast"))
              .build();
        }
      }
    }
    return getBroadcastMethod;
  }

  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.orderer.DeliverResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
  public static io.grpc.MethodDescriptor getDeliverMethod() {
    io.grpc.MethodDescriptor getDeliverMethod;
    if ((getDeliverMethod = AtomicBroadcastGrpc.getDeliverMethod) == null) {
      synchronized (AtomicBroadcastGrpc.class) {
        if ((getDeliverMethod = AtomicBroadcastGrpc.getDeliverMethod) == null) {
          AtomicBroadcastGrpc.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.orderer.DeliverResponse.getDefaultInstance()))
              .setSchemaDescriptor(new AtomicBroadcastMethodDescriptorSupplier("Deliver"))
              .build();
        }
      }
    }
    return getDeliverMethod;
  }

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

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

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

  /**
   */
  public interface AsyncService {

    /**
     * 
     * broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure
     * 
*/ default io.grpc.stub.StreamObserver broadcast( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getBroadcastMethod(), responseObserver); } /** *
     * deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled 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); } } /** * Base class for the server implementation of the service AtomicBroadcast. */ public static abstract class AtomicBroadcastImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return AtomicBroadcastGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service AtomicBroadcast. */ public static final class AtomicBroadcastStub extends io.grpc.stub.AbstractAsyncStub { private AtomicBroadcastStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AtomicBroadcastStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AtomicBroadcastStub(channel, callOptions); } /** *
     * broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure
     * 
*/ public io.grpc.stub.StreamObserver broadcast( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getBroadcastMethod(), getCallOptions()), responseObserver); } /** *
     * deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled 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); } } /** * A stub to allow clients to do synchronous rpc calls to service AtomicBroadcast. */ public static final class AtomicBroadcastBlockingStub extends io.grpc.stub.AbstractBlockingStub { private AtomicBroadcastBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AtomicBroadcastBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AtomicBroadcastBlockingStub(channel, callOptions); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service AtomicBroadcast. */ public static final class AtomicBroadcastFutureStub extends io.grpc.stub.AbstractFutureStub { private AtomicBroadcastFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected AtomicBroadcastFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new AtomicBroadcastFutureStub(channel, callOptions); } } private static final int METHODID_BROADCAST = 0; private static final int METHODID_DELIVER = 1; 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_BROADCAST: return (io.grpc.stub.StreamObserver) serviceImpl.broadcast( (io.grpc.stub.StreamObserver) responseObserver); case METHODID_DELIVER: return (io.grpc.stub.StreamObserver) serviceImpl.deliver( (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( getBroadcastMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.common.Envelope, org.hyperledger.fabric.protos.orderer.BroadcastResponse>( service, METHODID_BROADCAST))) .addMethod( getDeliverMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.common.Envelope, org.hyperledger.fabric.protos.orderer.DeliverResponse>( service, METHODID_DELIVER))) .build(); } private static abstract class AtomicBroadcastBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { AtomicBroadcastBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return org.hyperledger.fabric.protos.orderer.AbProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("AtomicBroadcast"); } } private static final class AtomicBroadcastFileDescriptorSupplier extends AtomicBroadcastBaseDescriptorSupplier { AtomicBroadcastFileDescriptorSupplier() {} } private static final class AtomicBroadcastMethodDescriptorSupplier extends AtomicBroadcastBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; AtomicBroadcastMethodDescriptorSupplier(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 (AtomicBroadcastGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AtomicBroadcastFileDescriptorSupplier()) .addMethod(getBroadcastMethod()) .addMethod(getDeliverMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy