Package org.apache.camel.builder

Examples of org.apache.camel.builder.RouteBuilder


        log.debug("Received: " + actualBody);
        assertEquals("Received body", expectedBody, actualBody);
    }

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
                from("direct:start").
                        marshal().xstream().
                        process(new Processor() {
                            public void process(Exchange exchange) throws Exception {
View Full Code Here


        mock.expectedMessageCount(0);
        mock.assertIsSatisfied();
    }

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
                from("direct:start")
                    .tryBlock()
                        .process(new ProcessorFail())
                        .to("mock:result")
View Full Code Here

        return camelContext;
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            public void configure() throws Exception {
                from("activemq:test.a").process(new Processor() {
                    public void process(Exchange exchange) throws Exception {
                        // lets set the custom JMS headers using the JMS API
            JmsMessage jmsMessage = assertIsInstanceOf(JmsMessage.class, exchange.getIn());
View Full Code Here

  @Override
  @Before
  public void setUp() throws Exception {
    super.setUp();
    this.camelContext = new DefaultCamelContext();
    this.camelContext.addRoutes(new RouteBuilder() {
      @Override
      public void configure() throws Exception {
        from("jetty:http://localhost:1148/?matchOnUriPrefix=true").process(
            new Processor() {
              public void process(final Exchange exchange) throws Exception {
View Full Code Here

    public boolean isUseRouteBuilder() {
        return false;
    }

    public void testPropertiesComponentEndpoint() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                    .to("{{first}}")
                    .to("mock:{{second}}")
View Full Code Here

    public CPOCsvCamelWatchService(@Named("ProcessCPOCsvEntry") final ActorRef actorRef,
                                   CamelContext camelContext,
                                   final @Named("cpo.from") String cpoFrom) throws Exception {
        this.camelContext = camelContext;

        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from(cpoFrom)
                        .unmarshal().bindy(BindyType.Csv, "models.csv")
                        .split(body())
View Full Code Here

        context.setTracing(true);
        PropertiesComponent properties = new PropertiesComponent("person2jms.cfg");
        context.addComponent("properties", properties);
        addTestJmsComponent();
       
        return new RouteBuilder[]{new Jms2RestRoute(), new RouteBuilder() {
           
            @Override
            public void configure() throws Exception {
                from("jetty:{{personServiceUri}}?matchOnUriPrefix=true").to(received);
            }
View Full Code Here

        assertEquals(6, data.size());
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("seda:test")
                    .to("log:foo?groupDelay=2000&groupSize=5&level=WARN")
                    .to("mock:result");
View Full Code Here

        assertTrue(mbeanServer.isRegistered(on));
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                Endpoint result = endpoint("mock:result");

                from("seda:test")
View Full Code Here

        finallyEndpoint = resolveMandatoryEndpoint("mock:finally", MockEndpoint.class);
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                    .doTry()
                        .to("validator:org/apache/camel/component/validator/text.xsd")
View Full Code Here

TOP

Related Classes of org.apache.camel.builder.RouteBuilder

Copyright © 2018 www.massapicom. 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.