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

javaVertXServer.RxCall.mustache Maven / Gradle / Ivy

There is a newer version: 1.6.0
Show newest version
                service.{{operationId}}({{#hasParams}}{{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/hasParams}}).subscribe(
                {{#returnType}}
                    result -> {
                    {{#isListContainer}}
                        message.reply(new JsonArray(Json.encode(result)).encodePrettily());
                    {{/isListContainer}}
                    {{^isListContainer}}
                        message.reply(new JsonObject(Json.encode(result)).encodePrettily());
                    {{/isListContainer}}
                {{/returnType}}
                {{^returnType}}
                    () -> {
                        message.reply(null);
                {{/returnType}}
                    },
                    error -> {
                        int code = MainApiException.INTERNAL_SERVER_ERROR.getStatusCode();
                        String statusMessage = MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage();
                        if (error instanceof MainApiException) {
                            code = ((MainApiException)error).getStatusCode();
                            statusMessage = ((MainApiException)error).getStatusMessage();
                        } else {
                            LOGGER.error("Unexpected error in "+{{#vendorExtensions}}{{x-serviceId-varName}}{{/vendorExtensions}}, error);
                        }
                
                        message.fail(code, statusMessage);
                    });




© 2015 - 2025 Weber Informatics LLC | Privacy Policy