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

com.redhat.mercury.openitemmanagement.v10.api.bqtrackingservice.MutinyBQTrackingServiceGrpc Maven / Gradle / Ivy

package com.redhat.mercury.openitemmanagement.v10.api.bqtrackingservice;

import static com.redhat.mercury.openitemmanagement.v10.api.bqtrackingservice.BQTrackingServiceGrpc.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_tracking_service.proto")
public final class MutinyBQTrackingServiceGrpc implements io.quarkus.grpc.runtime.MutinyGrpc {
    private MutinyBQTrackingServiceGrpc() {}

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

    
    public static final class MutinyBQTrackingServiceStub extends io.grpc.stub.AbstractStub implements io.quarkus.grpc.runtime.MutinyStub {
        private BQTrackingServiceGrpc.BQTrackingServiceStub delegateStub;

        private MutinyBQTrackingServiceStub(io.grpc.Channel channel) {
            super(channel);
            delegateStub = BQTrackingServiceGrpc.newStub(channel);
        }

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

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

        
        public io.smallrye.mutiny.Uni retrieveTracking(com.redhat.mercury.openitemmanagement.v10.api.bqtrackingservice.BqTrackingService.RetrieveTrackingRequest request) {
            return io.quarkus.grpc.runtime.ClientCalls.oneToOne(request, delegateStub::retrieveTracking);
        }

    }

    
    public static abstract class BQTrackingServiceImplBase 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 BQTrackingServiceImplBase withCompression(String compression) {
        this.compression = compression;
        return this;
        }


        
        public io.smallrye.mutiny.Uni retrieveTracking(com.redhat.mercury.openitemmanagement.v10.api.bqtrackingservice.BqTrackingService.RetrieveTrackingRequest 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.openitemmanagement.v10.api.bqtrackingservice.BQTrackingServiceGrpc.getRetrieveTrackingMethod(),
                            asyncUnaryCall(
                                    new MethodHandlers<
                                            com.redhat.mercury.openitemmanagement.v10.api.bqtrackingservice.BqTrackingService.RetrieveTrackingRequest,
                                            com.redhat.mercury.openitemmanagement.v10.TrackingOuterClass.Tracking>(
                                            this, METHODID_RETRIEVE_TRACKING, compression)))
                    .build();
        }
    }

    private static final int METHODID_RETRIEVE_TRACKING = 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 BQTrackingServiceImplBase serviceImpl;
        private final int methodId;
        private final String compression;

        MethodHandlers(BQTrackingServiceImplBase 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_TRACKING:
                    io.quarkus.grpc.runtime.ServerCalls.oneToOne((com.redhat.mercury.openitemmanagement.v10.api.bqtrackingservice.BqTrackingService.RetrieveTrackingRequest) request,
                            (io.grpc.stub.StreamObserver) responseObserver,
                            compression,
                            serviceImpl::retrieveTracking);
                    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