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

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

package com.salesforce.reactivegrpc.jmh.proto;

import static com.salesforce.reactivegrpc.jmh.proto.ReportQpsScenarioServiceGrpc.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 RxGrpc generator",
comments = "Source: grpc/testing/services.proto")
public final class RxReportQpsScenarioServiceGrpc {
    private RxReportQpsScenarioServiceGrpc() {}

    public static RxReportQpsScenarioServiceStub newRxStub(io.grpc.Channel channel) {
        return new RxReportQpsScenarioServiceStub(channel);
    }

    public static final class RxReportQpsScenarioServiceStub extends io.grpc.stub.AbstractStub {
        private ReportQpsScenarioServiceGrpc.ReportQpsScenarioServiceStub delegateStub;

        private RxReportQpsScenarioServiceStub(io.grpc.Channel channel) {
            super(channel);
            delegateStub = ReportQpsScenarioServiceGrpc.newStub(channel);
        }

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

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

        /**
         * 
         *  Report results of a QPS test benchmark scenario.
         * 
*/ public io.reactivex.Single reportScenario(io.reactivex.Single rxRequest) { return com.salesforce.rxgrpc.stub.ClientCalls.oneToOne(rxRequest, new com.salesforce.reactivegrpc.common.BiConsumer>() { @java.lang.Override public void accept(com.salesforce.reactivegrpc.jmh.proto.Control.ScenarioResult request, io.grpc.stub.StreamObserver observer) { delegateStub.reportScenario(request, observer); } }); } /** *
         *  Report results of a QPS test benchmark scenario.
         * 
*/ public io.reactivex.Single reportScenario(com.salesforce.reactivegrpc.jmh.proto.Control.ScenarioResult rxRequest) { return com.salesforce.rxgrpc.stub.ClientCalls.oneToOne(io.reactivex.Single.just(rxRequest), new com.salesforce.reactivegrpc.common.BiConsumer>() { @java.lang.Override public void accept(com.salesforce.reactivegrpc.jmh.proto.Control.ScenarioResult request, io.grpc.stub.StreamObserver observer) { delegateStub.reportScenario(request, observer); } }); } } public static abstract class ReportQpsScenarioServiceImplBase implements io.grpc.BindableService { /** *
         *  Report results of a QPS test benchmark scenario.
         * 
*/ public io.reactivex.Single reportScenario(io.reactivex.Single 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.ReportQpsScenarioServiceGrpc.getReportScenarioMethod(), asyncUnaryCall( new MethodHandlers< com.salesforce.reactivegrpc.jmh.proto.Control.ScenarioResult, com.salesforce.reactivegrpc.jmh.proto.Control.Void>( this, METHODID_REPORT_SCENARIO))) .build(); } } private static final int METHODID_REPORT_SCENARIO = 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 ReportQpsScenarioServiceImplBase serviceImpl; private final int methodId; MethodHandlers(ReportQpsScenarioServiceImplBase 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_REPORT_SCENARIO: com.salesforce.rxgrpc.stub.ServerCalls.oneToOne((com.salesforce.reactivegrpc.jmh.proto.Control.ScenarioResult) request, (io.grpc.stub.StreamObserver) responseObserver, new com.salesforce.reactivegrpc.common.Function, io.reactivex.Single>() { @java.lang.Override public io.reactivex.Single apply(io.reactivex.Single single) { return serviceImpl.reportScenario(single); } }); 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) { default: throw new java.lang.AssertionError(); } } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy