Package org.apache.camel.builder

Examples of org.apache.camel.builder.RouteBuilder.from()


    @Produce(uri = "direct:start")
    protected ProducerTemplate template;

    protected RouteBuilder createRouteBuilder() throws Exception {
        RouteBuilder routeBuilder = super.createRouteBuilder();
        routeBuilder.from("direct:start").setHeader("foo", constant("bar")).to("dns:ip").to("mock:result");

        return routeBuilder;
    }

    @Test
View Full Code Here


    protected ProducerTemplate template;

    protected RouteBuilder createRouteBuilder() throws Exception {
        RouteBuilder routeBuilder = super.createRouteBuilder();

        routeBuilder.from("direct:start").to("dns:dig").to("mock:result");

        return routeBuilder;
    }

    @Test
View Full Code Here

    RouteBuilder rb = new RouteBuilder() {
      public void configure() throws Exception {
      }
    };
    if ("JAXB".equals(configuration.getMarshaller())) {
      rb.from("direct:with-session-jaxb").to("drools:" + smId + "/" + configuration.getSessionId() + "?dataFormat=drools-jaxb");
    }
    else if ("XSTREAM".equals(configuration.getMarshaller())) {
      rb.from("direct:with-session-xstream").to("drools:" + smId + "/" + configuration.getSessionId() + "?dataFormat=drools-xstream");
    }
    else {
View Full Code Here

    };
    if ("JAXB".equals(configuration.getMarshaller())) {
      rb.from("direct:with-session-jaxb").to("drools:" + smId + "/" + configuration.getSessionId() + "?dataFormat=drools-jaxb");
    }
    else if ("XSTREAM".equals(configuration.getMarshaller())) {
      rb.from("direct:with-session-xstream").to("drools:" + smId + "/" + configuration.getSessionId() + "?dataFormat=drools-xstream");
    }
    else {
      throw new IllegalArgumentException("Invalid marshaller value on camel routes creation: " + configuration.getMarshaller());
    }
    camelContext.addRoutes(rb);
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.