org.apache.camel.support.AsyncProcessorConverterHelper Java Examples
The following examples show how to use
org.apache.camel.support.AsyncProcessorConverterHelper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KnativeProducer.java From camel-k-runtime with Apache License 2.0 | 5 votes |
public KnativeProducer(Endpoint endpoint, Processor processor, Processor... processors) { super(endpoint); List<Processor> elements = new ArrayList<>(1 + processors.length); elements.add(processor); for (Processor p : processors) { elements.add(p); } Processor pipeline = Pipeline.newInstance(endpoint.getCamelContext(), elements); this.processor = AsyncProcessorConverterHelper.convert(pipeline); }
Example #2
Source File: ProcessorsTest.java From syndesis with Apache License 2.0 | 5 votes |
@Test public void shouldCombineMultipleBeforeProducersIntoPipeline() { final ComponentProxyComponent component = createComponent(); adder.accept(component, processor1); adder.accept(component, processor2); adder.accept(component, processor3); final Processor got = getter.apply(component); assertThat(got).isInstanceOf(Pipeline.class); final Pipeline pipeline = (Pipeline) got; assertThat(pipeline.next()).containsExactly(AsyncProcessorConverterHelper.convert(processor1), AsyncProcessorConverterHelper.convert(processor2), AsyncProcessorConverterHelper.convert(processor3)); }
Example #3
Source File: ProcessorsTest.java From syndesis with Apache License 2.0 | 5 votes |
@Test public void shouldCombineTwoProcessorsIntoPipeline() { final ComponentProxyComponent component = createComponent(); adder.accept(component, processor1); adder.accept(component, processor2); final Processor got = getter.apply(component); assertThat(got).isInstanceOf(Pipeline.class); final Pipeline pipeline = (Pipeline) got; assertThat(pipeline.next()).containsExactly(AsyncProcessorConverterHelper.convert(processor1), AsyncProcessorConverterHelper.convert(processor2)); }
Example #4
Source File: ComponentProxyProducer.java From syndesis with Apache License 2.0 | 4 votes |
public ComponentProxyProducer(final Endpoint endpoint, final Processor processor) { super(endpoint); this.processor = AsyncProcessorConverterHelper.convert(processor); }
Example #5
Source File: FromVertxToCamelProducer.java From vertx-camel-bridge with Apache License 2.0 | 3 votes |
/** * Creates a new instance of producer. * * @param vertx the vert.x instance * @param producer the underlying producer, must not be {@code null} * @param outbound the outbound configuration, must not be {@code null} * @param blocking whether or not the processing is blocking and so should not be run on the event * loop * @param pool the pool on which the blocking code is going to be executed */ public FromVertxToCamelProducer(Vertx vertx, Producer producer, OutboundMapping outbound, boolean blocking, WorkerExecutor pool) { this.endpoint = producer.getEndpoint(); this.producer = AsyncProcessorConverterHelper.convert(producer); this.outbound = outbound; this.blocking = blocking; this.vertx = vertx; this.pool = pool; }