Examples of CamelContextResource


Examples of org.apache.camel.rest.resources.CamelContextResource

public class CamelRouteTest extends TestCase {
    protected AbstractXmlApplicationContext applicationContext;
    protected CamelContext camelContext;

    public void testCanMarshalRoutes() throws Exception {
        CamelContextResource resource = new CamelContextResource(camelContext);
        RoutesType routes = resource.getRouteDefinitions();
        List<RouteType> list = routes.getRoutes();
        System.out.println("Found routes: " + list);

        // now lets marshall to XML
        JAXBContext context = JAXBContext.newInstance(RoutesType.class.getPackage().getName());
View Full Code Here

Examples of org.apache.camel.web.resources.CamelContextResource

    protected AbstractXmlApplicationContext applicationContext;
    protected CamelContext camelContext;
    @Test
    public void testCanMarshalRoutes() throws Exception {
        CamelContextResource resource = new CamelContextResource(camelContext);
        RoutesDefinition routes = resource.getRoutesResource().getRouteDefinitions();
        List<RouteDefinition> list = routes.getRoutes();
        System.out.println("Found routes: " + list);

        // now lets marshall to XML
        JAXBContext context = JAXBContext.newInstance(RoutesDefinition.class.getPackage().getName());
View Full Code Here

Examples of org.apache.camel.web.resources.CamelContextResource

    private CamelContext camelContext;
    private RouteStatistics statistics = new JMXRouteStatistics();
    @Test
    public void testRouteStats() throws Exception {
        CamelContextResource resource = new CamelContextResource(camelContext);
        RoutesDefinition routes = resource.getRoutesResource().getRouteDefinitions();
        List<RouteDefinition> list = routes.getRoutes();
        Object exchangesCompleted = statistics.getRouteStatistic(camelContext, list.get(0).getId(), "ExchangesCompleted");
        assertEquals("JMX value incorrect, should be 0", new Long(0), exchangesCompleted);

        NotifyBuilder notify = new NotifyBuilder(camelContext).whenDone(1).create();
View Full Code Here

Examples of org.apache.camel.web.resources.CamelContextResource

    protected AbstractXmlApplicationContext applicationContext;
    protected CamelContext camelContext;
    @Test
    public void testCanMarshalRoutes() throws Exception {
        CamelContextResource resource = new CamelContextResource(camelContext);
        RoutesDefinition routes = resource.getRoutesResource().getRouteDefinitions();
        List<RouteDefinition> list = routes.getRoutes();
        System.out.println("Found routes: " + list);

        // now lets marshall to XML
        JAXBContext context = JAXBContext.newInstance(RoutesDefinition.class.getPackage().getName());
View Full Code Here

Examples of org.apache.camel.web.resources.CamelContextResource

public class CamelRouteTest extends TestCase {
    protected AbstractXmlApplicationContext applicationContext;
    protected CamelContext camelContext;

    public void testCanMarshalRoutes() throws Exception {
        CamelContextResource resource = new CamelContextResource(camelContext);
        RoutesDefinition routes = resource.getRoutesResource().getRouteDefinitions();
        List<RouteDefinition> list = routes.getRoutes();
        System.out.println("Found routes: " + list);

        // now lets marshall to XML
        JAXBContext context = JAXBContext.newInstance(RoutesDefinition.class.getPackage().getName());
View Full Code Here

Examples of org.apache.camel.web.resources.CamelContextResource

    protected AbstractXmlApplicationContext applicationContext;
    protected CamelContext camelContext;
    @Test
    public void testCanMarshalRoutes() throws Exception {
        CamelContextResource resource = new CamelContextResource(camelContext);
        RoutesDefinition routes = resource.getRoutesResource().getRouteDefinitions();
        List<RouteDefinition> list = routes.getRoutes();
        System.out.println("Found routes: " + list);

        // now lets marshall to XML
        JAXBContext context = JAXBContext.newInstance(RoutesDefinition.class.getPackage().getName());
View Full Code Here

Examples of org.apache.camel.web.resources.CamelContextResource

    private CamelContext camelContext;
    private RouteStatistics statistics = new JMXRouteStatistics();
    @Test
    public void testRouteStats() throws Exception {
        CamelContextResource resource = new CamelContextResource(camelContext);
        RoutesDefinition routes = resource.getRoutesResource().getRouteDefinitions();
        List<RouteDefinition> list = routes.getRoutes();
        Object exchangesCompleted = statistics.getRouteStatistic(camelContext, list.get(0).getId(), "ExchangesCompleted");
        assertEquals("JMX value incorrect, should be 0", new Long(0), exchangesCompleted);

        NotifyBuilder notify = new NotifyBuilder(camelContext).whenDone(1).create();
View Full Code Here

Examples of org.apache.camel.web.resources.CamelContextResource

    protected AbstractXmlApplicationContext applicationContext;
    protected CamelContext camelContext;
    @Test
    public void testCanMarshalRoutes() throws Exception {
        CamelContextResource resource = new CamelContextResource(camelContext);
        RoutesDefinition routes = resource.getRoutesResource().getRouteDefinitions();
        List<RouteDefinition> list = routes.getRoutes();
        log.info("Found routes: " + list);

        // now lets marshall to XML
        JAXBContext context = JAXBContext.newInstance(RoutesDefinition.class.getPackage().getName());
View Full Code Here

Examples of org.apache.camel.web.resources.CamelContextResource

    protected AbstractXmlApplicationContext applicationContext;
    protected CamelContext camelContext;
    @Test
    public void testCanMarshalRoutes() throws Exception {
        CamelContextResource resource = new CamelContextResource(camelContext);
        RoutesDefinition routes = resource.getRoutesResource().getRouteDefinitions();
        List<RouteDefinition> list = routes.getRoutes();
        System.out.println("Found routes: " + list);

        // now lets marshall to XML
        JAXBContext context = JAXBContext.newInstance(RoutesDefinition.class.getPackage().getName());
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.