Search in sources :

Example 36 with Route

use of org.apache.camel.Route in project Activiti by Activiti.

the class CamelExceptionTest method tearDown.

public void tearDown() throws Exception {
    List<Route> routes = camelContext.getRoutes();
    for (Route r : routes) {
        camelContext.stopRoute(r.getId());
        camelContext.removeRoute(r.getId());
    }
}
Also used : Route(org.apache.camel.Route)

Example 37 with Route

use of org.apache.camel.Route in project Activiti by Activiti.

the class AsyncProcessTest method tearDown.

public void tearDown() throws Exception {
    List<Route> routes = camelContext.getRoutes();
    for (Route r : routes) {
        camelContext.stopRoute(r.getId());
        camelContext.removeRoute(r.getId());
    }
}
Also used : Route(org.apache.camel.Route)

Example 38 with Route

use of org.apache.camel.Route in project Activiti by Activiti.

the class CamelVariableBodyTest method tearDown.

public void tearDown() throws Exception {
    List<Route> routes = camelContext.getRoutes();
    for (Route r : routes) {
        camelContext.stopRoute(r.getId());
        camelContext.removeRoute(r.getId());
    }
}
Also used : Route(org.apache.camel.Route)

Example 39 with Route

use of org.apache.camel.Route in project Activiti by Activiti.

the class EmptyProcessTest method tearDown.

public void tearDown() throws Exception {
    List<Route> routes = camelContext.getRoutes();
    for (Route r : routes) {
        camelContext.stopRoute(r.getId());
        camelContext.removeRoute(r.getId());
    }
}
Also used : Route(org.apache.camel.Route)

Example 40 with Route

use of org.apache.camel.Route in project camel by apache.

the class ErrorHandlerTest method testEndpointConfiguration.

public void testEndpointConfiguration() throws Exception {
    SpringCamelContext context = applicationContext.getBeansOfType(SpringCamelContext.class).values().iterator().next();
    List<Route> list = context.getRoutes();
    assertEquals("Number routes created" + list, 2, list.size());
    for (Route route : list) {
        EventDrivenConsumerRoute consumerRoute = assertIsInstanceOf(EventDrivenConsumerRoute.class, route);
        Channel channel = unwrapChannel(consumerRoute.getProcessor());
        DeadLetterChannel deadLetterChannel = assertIsInstanceOf(DeadLetterChannel.class, channel.getErrorHandler());
        RedeliveryPolicy redeliveryPolicy = deadLetterChannel.getRedeliveryPolicy();
        assertEquals("getMaximumRedeliveries()", 1, redeliveryPolicy.getMaximumRedeliveries());
        assertEquals("isUseExponentialBackOff()", true, redeliveryPolicy.isUseExponentialBackOff());
    }
}
Also used : DeadLetterChannel(org.apache.camel.processor.DeadLetterChannel) Channel(org.apache.camel.Channel) DeadLetterChannel(org.apache.camel.processor.DeadLetterChannel) SpringCamelContext(org.apache.camel.spring.SpringCamelContext) RedeliveryPolicy(org.apache.camel.processor.RedeliveryPolicy) EventDrivenConsumerRoute(org.apache.camel.impl.EventDrivenConsumerRoute) Route(org.apache.camel.Route) EventDrivenConsumerRoute(org.apache.camel.impl.EventDrivenConsumerRoute)

Aggregations

Route (org.apache.camel.Route)90 EventDrivenConsumerRoute (org.apache.camel.impl.EventDrivenConsumerRoute)27 Endpoint (org.apache.camel.Endpoint)24 Channel (org.apache.camel.Channel)17 DeadLetterChannel (org.apache.camel.processor.DeadLetterChannel)15 Processor (org.apache.camel.Processor)13 ArrayList (java.util.ArrayList)12 SendProcessor (org.apache.camel.processor.SendProcessor)11 CamelContext (org.apache.camel.CamelContext)10 ShutdownRoute (org.apache.camel.ShutdownRoute)8 FilterProcessor (org.apache.camel.processor.FilterProcessor)7 RoutePolicy (org.apache.camel.spi.RoutePolicy)6 HashMap (java.util.HashMap)5 Service (org.apache.camel.Service)5 LinkedHashMap (java.util.LinkedHashMap)4 Map (java.util.Map)4 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)4 DelegateProcessor (org.apache.camel.DelegateProcessor)4 MockEndpoint (org.apache.camel.component.mock.MockEndpoint)4 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)4