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

com.salesforce.reactivegrpc.jmh.proto.ReactorBenchmarkServiceGrpc Maven / Gradle / Ivy

package com.salesforce.reactivegrpc.jmh.proto;

import static com.salesforce.reactivegrpc.jmh.proto.BenchmarkServiceGrpc.getServiceDescriptor;
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;


@javax.annotation.Generated(
value = "by ReactorGrpc generator",
comments = "Source: grpc/testing/services.proto")
public final class ReactorBenchmarkServiceGrpc {
    private ReactorBenchmarkServiceGrpc() {}

    public static ReactorBenchmarkServiceStub newReactorStub(io.grpc.Channel channel) {
        return new ReactorBenchmarkServiceStub(channel);
    }

    public static final class ReactorBenchmarkServiceStub extends io.grpc.stub.AbstractStub {
        private BenchmarkServiceGrpc.BenchmarkServiceStub delegateStub;

        private ReactorBenchmarkServiceStub(io.grpc.Channel channel) {
            super(channel);
            delegateStub = BenchmarkServiceGrpc.newStub(channel);
        }

        private ReactorBenchmarkServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
            super(channel, callOptions);
            delegateStub = BenchmarkServiceGrpc.newStub(channel).build(channel, callOptions);
        }

        @Override
        protected ReactorBenchmarkServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
            return new ReactorBenchmarkServiceStub(channel, callOptions);
        }

        /**
         * 
         *  One request followed by one response.
         *  The server returns the client payload as-is.
         * 
*/ public reactor.core.publisher.Mono unaryCall(reactor.core.publisher.Mono reactorRequest) { return com.salesforce.reactorgrpc.stub.ClientCalls.oneToOne(reactorRequest, delegateStub::unaryCall); } /** *
         *  Repeated sequence of one request followed by one response.
         *  Should be called streaming ping-pong
         *  The server returns the client payload as-is on each response
         * 
*/ public reactor.core.publisher.Flux streamingCall(reactor.core.publisher.Flux reactorRequest) { return com.salesforce.reactorgrpc.stub.ClientCalls.manyToMany(reactorRequest, delegateStub::streamingCall); } /** *
         *  Single-sided unbounded streaming from client to server
         *  The server returns the client payload as-is once the client does WritesDone
         * 
*/ public reactor.core.publisher.Mono streamingFromClient(reactor.core.publisher.Flux reactorRequest) { return com.salesforce.reactorgrpc.stub.ClientCalls.manyToOne(reactorRequest, delegateStub::streamingFromClient); } /** *
         *  Single-sided unbounded streaming from server to client
         *  The server repeatedly returns the client payload as-is
         * 
*/ public reactor.core.publisher.Flux streamingFromServer(reactor.core.publisher.Mono reactorRequest) { return com.salesforce.reactorgrpc.stub.ClientCalls.oneToMany(reactorRequest, delegateStub::streamingFromServer); } /** *
         *  Two-sided unbounded streaming between server to client
         *  Both sides send the content of their own choice to the other
         * 
*/ public reactor.core.publisher.Flux streamingBothWays(reactor.core.publisher.Flux reactorRequest) { return com.salesforce.reactorgrpc.stub.ClientCalls.manyToMany(reactorRequest, delegateStub::streamingBothWays); } /** *
         *  One request followed by one response.
         *  The server returns the client payload as-is.
         * 
*/ public reactor.core.publisher.Mono unaryCall(com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleRequest reactorRequest) { return com.salesforce.reactorgrpc.stub.ClientCalls.oneToOne(reactor.core.publisher.Mono.just(reactorRequest), delegateStub::unaryCall); } /** *
         *  Single-sided unbounded streaming from server to client
         *  The server repeatedly returns the client payload as-is
         * 
*/ public reactor.core.publisher.Flux streamingFromServer(com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleRequest reactorRequest) { return com.salesforce.reactorgrpc.stub.ClientCalls.oneToMany(reactor.core.publisher.Mono.just(reactorRequest), delegateStub::streamingFromServer); } } public static abstract class BenchmarkServiceImplBase implements io.grpc.BindableService { /** *
         *  One request followed by one response.
         *  The server returns the client payload as-is.
         * 
*/ public reactor.core.publisher.Mono unaryCall(reactor.core.publisher.Mono request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } /** *
         *  Repeated sequence of one request followed by one response.
         *  Should be called streaming ping-pong
         *  The server returns the client payload as-is on each response
         * 
*/ public reactor.core.publisher.Flux streamingCall(reactor.core.publisher.Flux request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } /** *
         *  Single-sided unbounded streaming from client to server
         *  The server returns the client payload as-is once the client does WritesDone
         * 
*/ public reactor.core.publisher.Mono streamingFromClient(reactor.core.publisher.Flux request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } /** *
         *  Single-sided unbounded streaming from server to client
         *  The server repeatedly returns the client payload as-is
         * 
*/ public reactor.core.publisher.Flux streamingFromServer(reactor.core.publisher.Mono request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } /** *
         *  Two-sided unbounded streaming between server to client
         *  Both sides send the content of their own choice to the other
         * 
*/ public reactor.core.publisher.Flux streamingBothWays(reactor.core.publisher.Flux request) { throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED); } @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( com.salesforce.reactivegrpc.jmh.proto.BenchmarkServiceGrpc.getUnaryCallMethod(), asyncUnaryCall( new MethodHandlers< com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleRequest, com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleResponse>( this, METHODID_UNARY_CALL))) .addMethod( com.salesforce.reactivegrpc.jmh.proto.BenchmarkServiceGrpc.getStreamingCallMethod(), asyncBidiStreamingCall( new MethodHandlers< com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleRequest, com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleResponse>( this, METHODID_STREAMING_CALL))) .addMethod( com.salesforce.reactivegrpc.jmh.proto.BenchmarkServiceGrpc.getStreamingFromClientMethod(), asyncClientStreamingCall( new MethodHandlers< com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleRequest, com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleResponse>( this, METHODID_STREAMING_FROM_CLIENT))) .addMethod( com.salesforce.reactivegrpc.jmh.proto.BenchmarkServiceGrpc.getStreamingFromServerMethod(), asyncServerStreamingCall( new MethodHandlers< com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleRequest, com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleResponse>( this, METHODID_STREAMING_FROM_SERVER))) .addMethod( com.salesforce.reactivegrpc.jmh.proto.BenchmarkServiceGrpc.getStreamingBothWaysMethod(), asyncBidiStreamingCall( new MethodHandlers< com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleRequest, com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleResponse>( this, METHODID_STREAMING_BOTH_WAYS))) .build(); } } private static final int METHODID_UNARY_CALL = 0; private static final int METHODID_STREAMING_CALL = 1; private static final int METHODID_STREAMING_FROM_CLIENT = 2; private static final int METHODID_STREAMING_FROM_SERVER = 3; private static final int METHODID_STREAMING_BOTH_WAYS = 4; 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 BenchmarkServiceImplBase serviceImpl; private final int methodId; MethodHandlers(BenchmarkServiceImplBase 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_UNARY_CALL: com.salesforce.reactorgrpc.stub.ServerCalls.oneToOne((com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleRequest) request, (io.grpc.stub.StreamObserver) responseObserver, serviceImpl::unaryCall); break; case METHODID_STREAMING_FROM_SERVER: com.salesforce.reactorgrpc.stub.ServerCalls.oneToMany((com.salesforce.reactivegrpc.jmh.proto.Messages.SimpleRequest) request, (io.grpc.stub.StreamObserver) responseObserver, serviceImpl::streamingFromServer); break; default: throw new java.lang.AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_STREAMING_CALL: return (io.grpc.stub.StreamObserver) com.salesforce.reactorgrpc.stub.ServerCalls.manyToMany( (io.grpc.stub.StreamObserver) responseObserver, serviceImpl::streamingCall); case METHODID_STREAMING_FROM_CLIENT: return (io.grpc.stub.StreamObserver) com.salesforce.reactorgrpc.stub.ServerCalls.manyToOne( (io.grpc.stub.StreamObserver) responseObserver, serviceImpl::streamingFromClient); case METHODID_STREAMING_BOTH_WAYS: return (io.grpc.stub.StreamObserver) com.salesforce.reactorgrpc.stub.ServerCalls.manyToMany( (io.grpc.stub.StreamObserver) responseObserver, serviceImpl::streamingBothWays); default: throw new java.lang.AssertionError(); } } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy