public ComponentProxyProducer(final Endpoint endpoint, final Processor processor) { super(endpoint); this.processor = AsyncProcessorConverterHelper.convert(processor); }
public ComponentProxyProducer(final Endpoint endpoint, final Processor processor) { super(endpoint); this.processor = AsyncProcessorConverterHelper.convert(processor); }
public HazelcastSedaConsumer(final Endpoint endpoint, final Processor processor) { super(endpoint, processor); this.endpoint = (HazelcastSedaEndpoint) endpoint; this.processor = AsyncProcessorConverterHelper.convert(processor); }
/** * Provides an {@link org.apache.camel.AsyncProcessor} interface to the configured * processor on the consumer. If the processor does not implement the interface, * it will be adapted so that it does. */ public synchronized AsyncProcessor getAsyncProcessor() { if (asyncProcessor == null) { asyncProcessor = AsyncProcessorConverterHelper.convert(processor); } return asyncProcessor; }
public EndpointMessageListener(JmsEndpoint endpoint, Processor processor) { this.endpoint = endpoint; this.processor = AsyncProcessorConverterHelper.convert(processor); }
public DisruptorConsumer(final DisruptorEndpoint endpoint, final Processor processor) { this.endpoint = endpoint; this.processor = AsyncProcessorConverterHelper.convert(processor); }
public CamelJGroupsReceiver(JGroupsEndpoint endpoint, Processor processor) { ObjectHelper.notNull(endpoint, "endpoint"); ObjectHelper.notNull(processor, "processor"); this.endpoint = endpoint; this.processor = AsyncProcessorConverterHelper.convert(processor); }
public RouteboxSedaConsumer(RouteboxSedaEndpoint endpoint, Processor processor) { super(endpoint); this.setProcessor(AsyncProcessorConverterHelper.convert(processor)); this.producer = endpoint.getConfig().getInnerProducerTemplate(); }
@Override public Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition<?> definition, Processor target, Processor nextTarget) throws Exception { // First processor needs to handle the in message as the out message from the consumer since // we can't intercept consumers FromDefinition from = getFromDefinition(definition); boolean captureIn = from!=null; boolean captureOut = definition.hasCustomIdAssigned(); if (captureIn || captureOut) { return AsyncProcessorConverterHelper.convert(exchange -> { if( captureIn ) { addToMap(exchange, from.getId(), exchange.getIn()); } target.process(exchange); if( captureOut ) { Message message = exchange.hasOut() ? exchange.getOut() : exchange.getIn(); addToMap(exchange, definition.getId(), message); } }); } else { // skip over processors with a generated id return target; } }