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

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

package org.hyperledger.fabric.protos.orderer;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Cluster defines communication between cluster members.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.68.0)", comments = "Source: orderer/cluster.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ClusterGrpc { private ClusterGrpc() {} public static final java.lang.String SERVICE_NAME = "orderer.Cluster"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getStepMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Step", requestType = org.hyperledger.fabric.protos.orderer.StepRequest.class, responseType = org.hyperledger.fabric.protos.orderer.StepResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor getStepMethod() { io.grpc.MethodDescriptor getStepMethod; if ((getStepMethod = ClusterGrpc.getStepMethod) == null) { synchronized (ClusterGrpc.class) { if ((getStepMethod = ClusterGrpc.getStepMethod) == null) { ClusterGrpc.getStepMethod = getStepMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Step")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.orderer.StepRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.orderer.StepResponse.getDefaultInstance())) .setSchemaDescriptor(new ClusterMethodDescriptorSupplier("Step")) .build(); } } } return getStepMethod; } /** * Creates a new async stub that supports all call types for the service */ public static ClusterStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ClusterStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ClusterStub(channel, callOptions); } }; return ClusterStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static ClusterBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ClusterBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ClusterBlockingStub(channel, callOptions); } }; return ClusterBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static ClusterFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public ClusterFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ClusterFutureStub(channel, callOptions); } }; return ClusterFutureStub.newStub(factory, channel); } /** *
   * Cluster defines communication between cluster members.
   * 
*/ public interface AsyncService { /** *
     * Step passes an implementation-specific message to another cluster member.
     * 
*/ default io.grpc.stub.StreamObserver step( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStepMethod(), responseObserver); } } /** * Base class for the server implementation of the service Cluster. *
   * Cluster defines communication between cluster members.
   * 
*/ public static abstract class ClusterImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return ClusterGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Cluster. *
   * Cluster defines communication between cluster members.
   * 
*/ public static final class ClusterStub extends io.grpc.stub.AbstractAsyncStub { private ClusterStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ClusterStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ClusterStub(channel, callOptions); } /** *
     * Step passes an implementation-specific message to another cluster member.
     * 
*/ public io.grpc.stub.StreamObserver step( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getStepMethod(), getCallOptions()), responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service Cluster. *
   * Cluster defines communication between cluster members.
   * 
*/ public static final class ClusterBlockingStub extends io.grpc.stub.AbstractBlockingStub { private ClusterBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ClusterBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ClusterBlockingStub(channel, callOptions); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Cluster. *
   * Cluster defines communication between cluster members.
   * 
*/ public static final class ClusterFutureStub extends io.grpc.stub.AbstractFutureStub { private ClusterFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected ClusterFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new ClusterFutureStub(channel, callOptions); } } private static final int METHODID_STEP = 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 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_STEP: return (io.grpc.stub.StreamObserver) serviceImpl.step( (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( getStepMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.orderer.StepRequest, org.hyperledger.fabric.protos.orderer.StepResponse>( service, METHODID_STEP))) .build(); } private static abstract class ClusterBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ClusterBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return org.hyperledger.fabric.protos.orderer.ClusterProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Cluster"); } } private static final class ClusterFileDescriptorSupplier extends ClusterBaseDescriptorSupplier { ClusterFileDescriptorSupplier() {} } private static final class ClusterMethodDescriptorSupplier extends ClusterBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; ClusterMethodDescriptorSupplier(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 (ClusterGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ClusterFileDescriptorSupplier()) .addMethod(getStepMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy