camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to called the processor
Date Thu, 22 Aug 2013 13:32:10 GMT
Hi

Try for example the console example
http://camel.apache.org/console-example.html

And in your example you can use a timer or something to schedule the
route to start
http://camel.apache.org/timer

And see for example this blog about using Camel with Java
http://saltnlight5.blogspot.se/2013/08/getting-started-with-apache-camel-using.html

You can find many articles / blogs about introducing Camel from this page
http://camel.apache.org/articles



On Thu, Aug 22, 2013 at 3:26 PM, abhimukh <writedeshmukh@live.com> wrote:
> Hi, am novice to Apache camel, I want to write the Standalone Camel class,
> just to called the processor for this i had written the following class and
> expect it should print the message on the console but its not working.
>
> can somebody help in this, how can i achieve it, and what am missing, the
> class written is as follow
>
> import org.apache.camel.CamelContext;
> import org.apache.camel.Exchange;
> import org.apache.camel.Processor;
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.impl.DefaultCamelContext;
>
> public class CamelGroovyIntegrationTest {
>
>         public static void main (String args[])throws Exception {
>                 CamelContext context = new DefaultCamelContext();
>
>                 context.addRoutes(new RouteBuilder() {
>
>                         @Override
>                         public void configure() throws Exception {
>
>
>                                 from("direct:start").process(new Processor() {
>
>                                         @Override
>                                         public void process(Exchange exchange) throws
Exception {
>                                         System.out.println("control in processor");
>
>                                         }
>                                 });
>
>                         }
>                 });
>
>                 context.start();
>                 Thread.sleep(10000);
>         context.stop();
>         }
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-called-the-processor-tp5737769.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message