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

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

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

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

/**
 * 
 * Interface exported by the events server
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.23.0)", comments = "Source: peer/events.proto") public final class EventsGrpc { private EventsGrpc() {} public static final String SERVICE_NAME = "protos.Events"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getChatMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Chat", requestType = org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent.class, responseType = org.hyperledger.fabric.protos.peer.PeerEvents.Event.class, methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) public static io.grpc.MethodDescriptor getChatMethod() { io.grpc.MethodDescriptor getChatMethod; if ((getChatMethod = EventsGrpc.getChatMethod) == null) { synchronized (EventsGrpc.class) { if ((getChatMethod = EventsGrpc.getChatMethod) == null) { EventsGrpc.getChatMethod = getChatMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Chat")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( org.hyperledger.fabric.protos.peer.PeerEvents.Event.getDefaultInstance())) .setSchemaDescriptor(new EventsMethodDescriptorSupplier("Chat")) .build(); } } } return getChatMethod; } /** * Creates a new async stub that supports all call types for the service */ public static EventsStub newStub(io.grpc.Channel channel) { return new EventsStub(channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static EventsBlockingStub newBlockingStub( io.grpc.Channel channel) { return new EventsBlockingStub(channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static EventsFutureStub newFutureStub( io.grpc.Channel channel) { return new EventsFutureStub(channel); } /** *
   * Interface exported by the events server
   * 
*/ public static abstract class EventsImplBase implements io.grpc.BindableService { /** *
     * event chatting using Event
     * 
*/ public io.grpc.stub.StreamObserver chat( io.grpc.stub.StreamObserver responseObserver) { return asyncUnimplementedStreamingCall(getChatMethod(), responseObserver); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getChatMethod(), asyncBidiStreamingCall( new MethodHandlers< org.hyperledger.fabric.protos.peer.PeerEvents.SignedEvent, org.hyperledger.fabric.protos.peer.PeerEvents.Event>( this, METHODID_CHAT))) .build(); } } /** *
   * Interface exported by the events server
   * 
*/ public static final class EventsStub extends io.grpc.stub.AbstractStub { private EventsStub(io.grpc.Channel channel) { super(channel); } private EventsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected EventsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EventsStub(channel, callOptions); } /** *
     * event chatting using Event
     * 
*/ public io.grpc.stub.StreamObserver chat( io.grpc.stub.StreamObserver responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getChatMethod(), getCallOptions()), responseObserver); } } /** *
   * Interface exported by the events server
   * 
*/ public static final class EventsBlockingStub extends io.grpc.stub.AbstractStub { private EventsBlockingStub(io.grpc.Channel channel) { super(channel); } private EventsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected EventsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EventsBlockingStub(channel, callOptions); } } /** *
   * Interface exported by the events server
   * 
*/ public static final class EventsFutureStub extends io.grpc.stub.AbstractStub { private EventsFutureStub(io.grpc.Channel channel) { super(channel); } private EventsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected EventsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new EventsFutureStub(channel, callOptions); } } private static final int METHODID_CHAT = 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 EventsImplBase serviceImpl; private final int methodId; MethodHandlers(EventsImplBase 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_CHAT: return (io.grpc.stub.StreamObserver) serviceImpl.chat( (io.grpc.stub.StreamObserver) responseObserver); default: throw new AssertionError(); } } } private static abstract class EventsBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { EventsBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return org.hyperledger.fabric.protos.peer.PeerEvents.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Events"); } } private static final class EventsFileDescriptorSupplier extends EventsBaseDescriptorSupplier { EventsFileDescriptorSupplier() {} } private static final class EventsMethodDescriptorSupplier extends EventsBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final String methodName; EventsMethodDescriptorSupplier(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 (EventsGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new EventsFileDescriptorSupplier()) .addMethod(getChatMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy