public void configure()

in generic-examples/traits/telemetry/InventoryService.java [38:59]


    public void configure() throws Exception {
        restConfiguration()
            .enableCORS(true)
            .bindingMode(RestBindingMode.json);

        rest()
            .post("/notify/order/place")
                .to("direct:notify");

        
        JacksonDataFormat invDataFormat = new JacksonDataFormat();
        invDataFormat.setUnmarshalType(InventoryNotification.class);

        from("direct:notify")
            .log("notifyorder--> ${body}")
            .setHeader(Exchange.CONTENT_TYPE, constant("application/json"))
            .bean(InventoryNotification.class, "getInventoryNotification(${body['orderId']},${body['itemId']},${body['quantity']} )")
            .marshal(invDataFormat)
            .log("Inventory Notified ${body}")
            .convertBodyTo(String.class)
        ;
    }