Search in sources :

Example 1 with DefaultChannel

use of org.apache.camel.processor.interceptor.DefaultChannel in project camel by apache.

the class RandomLoadBalanceJavaDSLBuilderTest method navigateRoute.

private void navigateRoute(Navigate<Processor> nav, StringBuilder sb) {
    if (!nav.hasNext()) {
        return;
    }
    if (nav instanceof DefaultChannel) {
        DefaultChannel channel = (DefaultChannel) nav;
        ProcessorDefinition<?> def = channel.getProcessorDefinition();
        navigateDefinition(def, sb);
    }
}
Also used : DefaultChannel(org.apache.camel.processor.interceptor.DefaultChannel)

Example 2 with DefaultChannel

use of org.apache.camel.processor.interceptor.DefaultChannel in project camel by apache.

the class ResequencerTest method testBatchResequencerTypeWithoutJmx.

public void testBatchResequencerTypeWithoutJmx() throws Exception {
    List<Route> list = getRouteList(createRouteBuilder());
    assertEquals("Number of routes created: " + list, 1, list.size());
    Route route = list.get(0);
    EventDrivenConsumerRoute consumerRoute = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);
    DefaultChannel channel = assertIsInstanceOf(DefaultChannel.class, unwrapChannel(consumerRoute.getProcessor()));
    assertIsInstanceOf(DefaultErrorHandler.class, channel.getErrorHandler());
    assertFalse("Should not have stream caching", channel.hasInterceptorStrategy(StreamCaching.class));
    assertIsInstanceOf(Resequencer.class, channel.getNextProcessor());
}
Also used : DefaultChannel(org.apache.camel.processor.interceptor.DefaultChannel) StreamCaching(org.apache.camel.processor.interceptor.StreamCaching) EventDrivenConsumerRoute(org.apache.camel.impl.EventDrivenConsumerRoute) Route(org.apache.camel.Route) EventDrivenConsumerRoute(org.apache.camel.impl.EventDrivenConsumerRoute)

Aggregations

DefaultChannel (org.apache.camel.processor.interceptor.DefaultChannel)2 Route (org.apache.camel.Route)1 EventDrivenConsumerRoute (org.apache.camel.impl.EventDrivenConsumerRoute)1 StreamCaching (org.apache.camel.processor.interceptor.StreamCaching)1