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

org.hyperledger.fabric.protos.gossip.GossipGrpc Maven / Gradle / Ivy

Go to download

Java SDK for Hyperledger Fabric. Deprecated as of Fabric v2.5, replaced by org.hyperledger.fabric:fabric-gateway.

There is a newer version: 2.2.26
Show newest version
package org.hyperledger.fabric.protos.gossip;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Gossip
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.53.0)", comments = "Source: gossip/message.proto") @io.grpc.stub.annotations.GrpcGenerated public final class GossipGrpc { private GossipGrpc() {} public static final String SERVICE_NAME = "gossip.Gossip"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getGossipStreamMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GossipStream", requestType = org.hyperledger.fabric.protos.gossip.Message.Envelope.class, responseType = org.hyperledger.fabric.protos.gossip.Message.Envelope.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor getGossipStreamMethod() { io.grpc.MethodDescriptor getGossipStreamMethod; if ((getGossipStreamMethod = GossipGrpc.getGossipStreamMethod) == null) { synchronized (GossipGrpc.class) { if ((getGossipStreamMethod = GossipGrpc.getGossipStreamMethod) == null) { GossipGrpc.getGossipStreamMethod = getGossipStreamMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GossipStream")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.gossip.Message.Envelope.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.gossip.Message.Envelope.getDefaultInstance())) .setSchemaDescriptor(new GossipMethodDescriptorSupplier("GossipStream")) .build(); } } } return getGossipStreamMethod; } private static volatile io.grpc.MethodDescriptor getPingMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Ping", requestType = org.hyperledger.fabric.protos.gossip.Message.Empty.class, responseType = org.hyperledger.fabric.protos.gossip.Message.Empty.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getPingMethod() { io.grpc.MethodDescriptor getPingMethod; if ((getPingMethod = GossipGrpc.getPingMethod) == null) { synchronized (GossipGrpc.class) { if ((getPingMethod = GossipGrpc.getPingMethod) == null) { GossipGrpc.getPingMethod = getPingMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Ping")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.gossip.Message.Empty.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.gossip.Message.Empty.getDefaultInstance())) .setSchemaDescriptor(new GossipMethodDescriptorSupplier("Ping")) .build(); } } } return getPingMethod; } /** * Creates a new async stub that supports all call types for the service */ public static GossipStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public GossipStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new GossipStub(channel, callOptions); } }; return GossipStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static GossipBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public GossipBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new GossipBlockingStub(channel, callOptions); } }; return GossipBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static GossipFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public GossipFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new GossipFutureStub(channel, callOptions); } }; return GossipFutureStub.newStub(factory, channel); } /** *
   * Gossip
   * 
*/ public static abstract class GossipImplBase implements io.grpc.BindableService { /** *
     * GossipStream is the gRPC stream used for sending and receiving messages
     * 
*/ public io.grpc.stub.StreamObserver gossipStream( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getGossipStreamMethod(), responseObserver); } /** *
     * Ping is used to probe a remote peer's aliveness
     * 
*/ public void ping(org.hyperledger.fabric.protos.gossip.Message.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPingMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getGossipStreamMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.gossip.Message.Envelope, org.hyperledger.fabric.protos.gossip.Message.Envelope>( this, METHODID_GOSSIP_STREAM))) .addMethod( getPingMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< org.hyperledger.fabric.protos.gossip.Message.Empty, org.hyperledger.fabric.protos.gossip.Message.Empty>( this, METHODID_PING))) .build(); } } /** *
   * Gossip
   * 
*/ public static final class GossipStub extends io.grpc.stub.AbstractAsyncStub { private GossipStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected GossipStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new GossipStub(channel, callOptions); } /** *
     * GossipStream is the gRPC stream used for sending and receiving messages
     * 
*/ public io.grpc.stub.StreamObserver gossipStream( io.grpc.stub.StreamObserver responseObserver) { return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( getChannel().newCall(getGossipStreamMethod(), getCallOptions()), responseObserver); } /** *
     * Ping is used to probe a remote peer's aliveness
     * 
*/ public void ping(org.hyperledger.fabric.protos.gossip.Message.Empty request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPingMethod(), getCallOptions()), request, responseObserver); } } /** *
   * Gossip
   * 
*/ public static final class GossipBlockingStub extends io.grpc.stub.AbstractBlockingStub { private GossipBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected GossipBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new GossipBlockingStub(channel, callOptions); } /** *
     * Ping is used to probe a remote peer's aliveness
     * 
*/ public org.hyperledger.fabric.protos.gossip.Message.Empty ping(org.hyperledger.fabric.protos.gossip.Message.Empty request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPingMethod(), getCallOptions(), request); } } /** *
   * Gossip
   * 
*/ public static final class GossipFutureStub extends io.grpc.stub.AbstractFutureStub { private GossipFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected GossipFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new GossipFutureStub(channel, callOptions); } /** *
     * Ping is used to probe a remote peer's aliveness
     * 
*/ public com.google.common.util.concurrent.ListenableFuture ping( org.hyperledger.fabric.protos.gossip.Message.Empty request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPingMethod(), getCallOptions()), request); } } private static final int METHODID_PING = 0; private static final int METHODID_GOSSIP_STREAM = 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 GossipImplBase serviceImpl; private final int methodId; MethodHandlers(GossipImplBase 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_PING: serviceImpl.ping((org.hyperledger.fabric.protos.gossip.Message.Empty) 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) { case METHODID_GOSSIP_STREAM: return (io.grpc.stub.StreamObserver) serviceImpl.gossipStream( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } private static abstract class GossipBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { GossipBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return org.hyperledger.fabric.protos.gossip.Message.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Gossip"); } } private static final class GossipFileDescriptorSupplier extends GossipBaseDescriptorSupplier { GossipFileDescriptorSupplier() {} } private static final class GossipMethodDescriptorSupplier extends GossipBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; GossipMethodDescriptorSupplier(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 (GossipGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new GossipFileDescriptorSupplier()) .addMethod(getGossipStreamMethod()) .addMethod(getPingMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy