public boolean process()

in camel/servicemix-camel/src/main/java/org/apache/servicemix/camel/nmr/ServiceMixProducer.java [73:102]


    public boolean process(Exchange exchange, AsyncCallback asyncCallback) {
        NMR nmr = getEndpoint().getComponent().getNmr();

        org.apache.servicemix.nmr.api.Exchange e
                = getEndpoint().getComponent().getBinding().populateNmrExchangeFromCamelExchange(exchange, channel);

        try {
            e.setTarget(nmr.getEndpointRegistry().lookup(
                    ServiceHelper.createMap(org.apache.servicemix.nmr.api.Endpoint.NAME,
                            getEndpoint().getEndpointName())));

            if (isSendSyncRequired()) {
                process(exchange);
                asyncCallback.done(true);
                return true;
            } else {
                continuations.put(e.getId(), new Continuation(exchange, asyncCallback));
                channel.send(e);
                return false;
            }
        } catch (Exception ex) {
            log.warn("Error occured while sending NMR exchange", ex);

            continuations.remove(e.getId());

            exchange.setException(ex);
            asyncCallback.done(true);
            return true;
        }
    }