added akka camel docs
This commit is contained in:
parent
92e3ca2629
commit
a7a96687e4
7 changed files with 698 additions and 52 deletions
35
akka-docs/scala/code/docs/camel/QuartzExample.scala
Normal file
35
akka-docs/scala/code/docs/camel/QuartzExample.scala
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
package docs.camel
|
||||
|
||||
|
||||
object QuartzExample {
|
||||
|
||||
{
|
||||
//#Quartz
|
||||
import akka.actor.{ActorSystem, Props}
|
||||
|
||||
import akka.camel.{Consumer}
|
||||
|
||||
class MyQuartzActor extends Consumer {
|
||||
|
||||
def endpointUri = "quartz://example?cron=0/2+*+*+*+*+?"
|
||||
|
||||
def receive = {
|
||||
|
||||
case msg => println("==============> received %s " format msg)
|
||||
|
||||
} // end receive
|
||||
|
||||
} // end MyQuartzActor
|
||||
|
||||
object MyQuartzActor {
|
||||
|
||||
def main(str: Array[String]) {
|
||||
val system = ActorSystem("my-quartz-system")
|
||||
system.actorOf(Props[MyQuartzActor])
|
||||
} // end main
|
||||
|
||||
} // end MyQuartzActor
|
||||
//#Quartz
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue