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

templates.java.ServiceGrpcServerMulti.template Maven / Gradle / Ivy

                if ( req.hasReq@service_name@()) {

                    LOG.info("Multi service execution - @service_name@");
                    @service_request@ aRequest = req.getReq@service_name@();

                    AbstractBackendController.ReqRes<@service_request@, @service_response@> reqres =
                        new AbstractBackendController.ReqRes<>(aRequest);

                    if (pipelines != null) {
                        for (AbstractBackendController pipeline : pipelines)
                            pipeline.onRequest@service_name@(reqres, prevSteps, context);
                    }

                    if ( ! context.manualOverride && reqres.response == null) {
                        @grpc_impl@ @service_name@(writer, reqres, prevSteps, context);
                    }

                    if (pipelines != null) {
                        for (AbstractBackendController pipeline : pipelines)
                            pipeline.onResponse@service_name@(reqres, prevSteps, context);
                    }

                    if ( null == reqres.response)  reqres.response = @[email protected]().setStatus(
                          Status.newBuilder().setStatus(StatusCode.UNKNOWN_ERROR).addErrorMessages("Null response reveived").build()).build();

                    Response aRes = Response.newBuilder().setRes@service_name@(reqres.response).build();
                    replyB.addResponse(aRes);

                    prevSteps.add(new AbstractBackendController.ReqRes(req,aRes));

                } else




© 2015 - 2024 Weber Informatics LLC | Privacy Policy