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

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

There is a newer version: 1.0.5
Show newest version
package org.hyperledger.fabric.protos.orderer;

import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;

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

  private AtomicBroadcastGrpc() {}

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

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor METHOD_BROADCAST =
      io.grpc.MethodDescriptor.newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
          .setFullMethodName(generateFullMethodName(
              "orderer.AtomicBroadcast", "Broadcast"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              org.hyperledger.fabric.protos.orderer.Ab.BroadcastResponse.getDefaultInstance()))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor METHOD_DELIVER =
      io.grpc.MethodDescriptor.newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
          .setFullMethodName(generateFullMethodName(
              "orderer.AtomicBroadcast", "Deliver"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              org.hyperledger.fabric.protos.common.Common.Envelope.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              org.hyperledger.fabric.protos.orderer.Ab.DeliverResponse.getDefaultInstance()))
          .build();

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static AtomicBroadcastStub newStub(io.grpc.Channel channel) {
    return new AtomicBroadcastStub(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) {
    return new AtomicBroadcastBlockingStub(channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static AtomicBroadcastFutureStub newFutureStub(
      io.grpc.Channel channel) {
    return new AtomicBroadcastFutureStub(channel);
  }

  /**
   */
  public static abstract class AtomicBroadcastImplBase implements io.grpc.BindableService {

    /**
     * 
     * 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 asyncUnimplementedStreamingCall(METHOD_BROADCAST, 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 asyncUnimplementedStreamingCall(METHOD_DELIVER, responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( METHOD_BROADCAST, asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.orderer.Ab.BroadcastResponse>( this, METHODID_BROADCAST))) .addMethod( METHOD_DELIVER, asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.common.Common.Envelope, org.hyperledger.fabric.protos.orderer.Ab.DeliverResponse>( this, METHODID_DELIVER))) .build(); } } /** */ public static final class AtomicBroadcastStub extends io.grpc.stub.AbstractStub { private AtomicBroadcastStub(io.grpc.Channel channel) { super(channel); } 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 asyncBidiStreamingCall( getChannel().newCall(METHOD_BROADCAST, 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 asyncBidiStreamingCall( getChannel().newCall(METHOD_DELIVER, getCallOptions()), responseObserver); } } /** */ public static final class AtomicBroadcastBlockingStub extends io.grpc.stub.AbstractStub { private AtomicBroadcastBlockingStub(io.grpc.Channel channel) { super(channel); } 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); } } /** */ public static final class AtomicBroadcastFutureStub extends io.grpc.stub.AbstractStub { private AtomicBroadcastFutureStub(io.grpc.Channel channel) { super(channel); } 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 AtomicBroadcastImplBase serviceImpl; private final int methodId; MethodHandlers(AtomicBroadcastImplBase 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(); } } } private static final class AtomicBroadcastDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier { @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return org.hyperledger.fabric.protos.orderer.Ab.getDescriptor(); } } 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 AtomicBroadcastDescriptorSupplier()) .addMethod(METHOD_BROADCAST) .addMethod(METHOD_DELIVER) .build(); } } } return result; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy