Examples of ExchangeSendingEvent


Examples of org.apache.camel.management.event.ExchangeSendingEvent

        template.sendBody("direct:start", "Hello World");

        assertMockEndpointsSatisfied();

        assertEquals(8, events.size());
        ExchangeSendingEvent e0 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(0));
        ExchangeSendingEvent e1 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(1));
        ExchangeSentEvent e2 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(2));
        ExchangeSendingEvent e3 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(3));
        ExchangeSentEvent e4 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(4));
        ExchangeSendingEvent e5 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(5));
        ExchangeSentEvent e6 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(6));
        ExchangeSentEvent e7 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(7));

        assertEquals("direct://start", e0.getEndpoint().getEndpointUri());

        assertEquals("log://foo", e1.getEndpoint().getEndpointUri());
        assertEquals("log://foo", e2.getEndpoint().getEndpointUri());

        assertEquals("direct://bar", e3.getEndpoint().getEndpointUri());
        assertEquals("direct://bar", e4.getEndpoint().getEndpointUri());
        long time = e4.getTimeTaken();
        assertTrue("Should take about 0.5 sec, was: " + time, time > 400);

        assertEquals("mock://result", e5.getEndpoint().getEndpointUri());
        assertEquals("mock://result", e6.getEndpoint().getEndpointUri());

        assertEquals("direct://start", e7.getEndpoint().getEndpointUri());
        time = e7.getTimeTaken();
        assertTrue("Should take about 0.5 sec, was: " + time, time > 400);
View Full Code Here

Examples of org.apache.camel.management.event.ExchangeSendingEvent

        // give it time to complete
        Thread.sleep(200);

        assertEquals(12, events.size());
        ExchangeSendingEvent e0 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(0));
        ExchangeSendingEvent e1 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(1));
        ExchangeSentEvent e2 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(2));
        ExchangeSendingEvent e3 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(3));
        ExchangeSendingEvent e4 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(4));
        ExchangeSentEvent e5 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(5));
        ExchangeSendingEvent e6 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(6));
        ExchangeSentEvent e7 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(7));
        ExchangeSendingEvent e8 = assertIsInstanceOf(ExchangeSendingEvent.class, events.get(8));
        ExchangeSentEvent e9 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(9));
        ExchangeSentEvent e10 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(10));
        ExchangeSentEvent e11 = assertIsInstanceOf(ExchangeSentEvent.class, events.get(11));

        assertEquals("direct://foo", e0.getEndpoint().getEndpointUri());
        assertEquals("direct://cool", e1.getEndpoint().getEndpointUri());
        assertEquals("direct://cool", e2.getEndpoint().getEndpointUri());
        assertEquals("direct://start", e3.getEndpoint().getEndpointUri());
        assertEquals("log://foo", e4.getEndpoint().getEndpointUri());
        assertEquals("log://foo", e5.getEndpoint().getEndpointUri());
        assertEquals("direct://bar", e6.getEndpoint().getEndpointUri());
        assertEquals("direct://bar", e7.getEndpoint().getEndpointUri());
        assertEquals("mock://result", e8.getEndpoint().getEndpointUri());
        assertEquals("mock://result", e9.getEndpoint().getEndpointUri());
        assertEquals("direct://start", e10.getEndpoint().getEndpointUri());
        assertEquals("direct://foo", e11.getEndpoint().getEndpointUri());
    }
View Full Code Here

Examples of org.apache.camel.management.event.ExchangeSendingEvent

            RouteRemovedEvent rse = (RouteRemovedEvent) event;
            String routeId = rse.getRoute().getId();
            inputs.remove(routeId);
            outputs.remove(routeId);
        } else {
            ExchangeSendingEvent ese = (ExchangeSendingEvent) event;
            Endpoint endpoint = ese.getEndpoint();
            String routeId = getRouteId(ese.getExchange());
            String uri = endpoint.getEndpointUri();

            Map<String, String> uris = outputs.get(routeId);
            if (uris != null && !uris.containsKey(uri)) {
                uris.put(uri, uri);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.