Making it green

This commit is contained in:
Viktor Klang 2012-07-22 21:40:09 +02:00
parent e5b3fd00a2
commit aa4ad6f3c3
20 changed files with 155 additions and 104 deletions

View file

@ -1,5 +1,11 @@
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package docs.camel
import language.postfixOps
object Consumers {
def foo = {
//#Consumer1
@ -53,7 +59,7 @@ object Consumers {
{
//#Consumer4
import akka.camel.{ CamelMessage, Consumer }
import akka.util.duration._
import scala.concurrent.util.duration._
class Consumer4 extends Consumer {
def endpointUri = "jetty:http://localhost:8877/camel/default"

View file

@ -1,8 +1,14 @@
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package docs.camel
import akka.camel.CamelMessage
import akka.actor.Status.Failure
import language.existentials
object CustomRoute {
{
//#CustomRoute

View file

@ -3,6 +3,8 @@ package docs.camel
import akka.actor.{ Props, ActorSystem }
import akka.camel.CamelExtension
import language.postfixOps
object Introduction {
def foo = {
//#Consumer-mina
@ -75,7 +77,7 @@ object Introduction {
{
//#CamelActivation
import akka.camel.{ CamelMessage, Consumer }
import akka.util.duration._
import scala.concurrent.util.duration._
class MyEndpoint extends Consumer {
def endpointUri = "mina:tcp://localhost:6200?textline=true"

View file

@ -1,6 +1,7 @@
package docs.camel
import akka.camel.CamelExtension
import language.postfixOps
object Producers {
{
@ -16,7 +17,7 @@ object Producers {
//#Producer1
//#AskProducer
import akka.pattern.ask
import akka.util.duration._
import scala.concurrent.util.duration._
implicit val timeout = Timeout(10 seconds)
val system = ActorSystem("some-system")

View file

@ -1,34 +1,30 @@
package docs.camel
object QuartzExample {
//#Quartz
import akka.actor.{ ActorSystem, Props }
{
//#Quartz
import akka.actor.{ ActorSystem, Props }
import akka.camel.{ Consumer }
import akka.camel.{ Consumer }
class MyQuartzActor extends Consumer {
class MyQuartzActor extends Consumer {
def endpointUri = "quartz://example?cron=0/2+*+*+*+*+?"
def endpointUri = "quartz://example?cron=0/2+*+*+*+*+?"
def receive = {
def receive = {
case msg println("==============> received %s " format msg)
case msg println("==============> received %s " format msg)
} // end receive
} // end receive
} // end MyQuartzActor
} // end MyQuartzActor
object MyQuartzActor {
object MyQuartzActor {
def main(str: Array[String]) {
val system = ActorSystem("my-quartz-system")
system.actorOf(Props[MyQuartzActor])
} // end main
} // end MyQuartzActor
//#Quartz
}
def main(str: Array[String]) {
val system = ActorSystem("my-quartz-system")
system.actorOf(Props[MyQuartzActor])
} // end main
} // end MyQuartzActor
//#Quartz
}