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

com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.MutinyBQInterestServiceGrpc Maven / Gradle / Ivy

The newest version!
package com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice;

import static com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BQInterestServiceGrpc.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 Mutiny Grpc generator",
comments = "Source: v10/api/bq_interest_service.proto")
public final class MutinyBQInterestServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc {
    private MutinyBQInterestServiceGrpc() {}

    public static MutinyBQInterestServiceStub newMutinyStub(io.grpc.Channel channel) {
        return new MutinyBQInterestServiceStub(channel);
    }

    
    public static final class MutinyBQInterestServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub {
        private BQInterestServiceGrpc.BQInterestServiceStub delegateStub;

        private MutinyBQInterestServiceStub(io.grpc.Channel channel) {
            super(channel);
            delegateStub = BQInterestServiceGrpc.newStub(channel);
        }

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

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

        
        public io.smallrye.mutiny.Uni retrieveInterest(com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BqInterestService.RetrieveInterestRequest request) {
            return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::retrieveInterest);
        }

        
        public io.smallrye.mutiny.Uni updateInterest(com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BqInterestService.UpdateInterestRequest request) {
            return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::updateInterest);
        }

    }

    
    public static abstract class BQInterestServiceImplBase implements io.grpc.BindableService {

        private String compression;
        /**
        * Set whether the server will try to use a compressed response.
        *
        * @param compression the compression, e.g {@code gzip}
        */
        public BQInterestServiceImplBase withCompression(String compression) {
        this.compression = compression;
        return this;
        }


        
        public io.smallrye.mutiny.Uni retrieveInterest(com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BqInterestService.RetrieveInterestRequest request) {
            throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
        }

        
        public io.smallrye.mutiny.Uni updateInterest(com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BqInterestService.UpdateInterestRequest 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.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BQInterestServiceGrpc.getRetrieveInterestMethod(),
                            asyncUnaryCall(
                                    new MethodHandlers<
                                            com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BqInterestService.RetrieveInterestRequest,
                                            com.redhat.mercury.merchandisingloan.v10.InterestOuterClass.Interest>(
                                            this, METHODID_RETRIEVE_INTEREST, compression)))
                    .addMethod(
                            com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BQInterestServiceGrpc.getUpdateInterestMethod(),
                            asyncUnaryCall(
                                    new MethodHandlers<
                                            com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BqInterestService.UpdateInterestRequest,
                                            com.redhat.mercury.merchandisingloan.v10.InterestOuterClass.Interest>(
                                            this, METHODID_UPDATE_INTEREST, compression)))
                    .build();
        }
    }

    private static final int METHODID_RETRIEVE_INTEREST = 0;
    private static final int METHODID_UPDATE_INTEREST = 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 BQInterestServiceImplBase serviceImpl;
        private final int methodId;
        private final String compression;

        MethodHandlers(BQInterestServiceImplBase serviceImpl, int methodId, String compression) {
            this.serviceImpl = serviceImpl;
            this.methodId = methodId;
            this.compression = compression;
        }

        @java.lang.Override
        @java.lang.SuppressWarnings("unchecked")
        public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
            switch (methodId) {
                case METHODID_RETRIEVE_INTEREST:
                    io.quarkus.grpc.runtime.ServerCalls.oneToOne((com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BqInterestService.RetrieveInterestRequest) request,
                            (io.grpc.stub.StreamObserver) responseObserver,
                            compression,
                            serviceImpl::retrieveInterest);
                    break;
                case METHODID_UPDATE_INTEREST:
                    io.quarkus.grpc.runtime.ServerCalls.oneToOne((com.redhat.mercury.merchandisingloan.v10.api.bqinterestservice.BqInterestService.UpdateInterestRequest) request,
                            (io.grpc.stub.StreamObserver) responseObserver,
                            compression,
                            serviceImpl::updateInterest);
                    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 - 2024 Weber Informatics LLC | Privacy Policy