The unborkening of master, fixing breakage in camel docs

This commit is contained in:
Viktor Klang 2012-04-24 13:48:13 +02:00
parent ac2d7b958a
commit 23ffacde9a
3 changed files with 41 additions and 36 deletions

View file

@ -63,7 +63,8 @@ component`_), only the actor's endpointUri method must be changed.
Actors can also trigger message exchanges with external systems i.e. produce to Actors can also trigger message exchanges with external systems i.e. produce to
Camel endpoints. Camel endpoints.
.. includecode:: code/akka/docs/camel/Introduction.scala#Producer .. includecode:: code/akka/docs/camel/Introduction.scala
:include: imports,Producer
In the above example, any message sent to this actor will be added (produced) to In the above example, any message sent to this actor will be added (produced) to
the example JMS queue. Producer actors may choose from the same set of Camel the example JMS queue. Producer actors may choose from the same set of Camel

View file

@ -1,44 +1,48 @@
package akka.docs.camel package akka.docs.camel
import akka.actor._ object wrapper {
import akka.camel._ {
//#Consumer-mina
import akka.camel.{ CamelMessage, Consumer }
//#Consumer-mina class MyActor extends Consumer {
import akka.actor.Actor
import akka.actor.Actor._
import akka.camel.{CamelMessage, Consumer}
class MyActor extends Consumer {
def endpointUri = "mina:tcp://localhost:6200?textline=true" def endpointUri = "mina:tcp://localhost:6200?textline=true"
def receive = { def receive = {
case msg: CamelMessage => { /* ... */} case msg: CamelMessage { /* ... */ }
case _ => { /* ... */} case _ { /* ... */ }
}
} }
}
// start and expose actor via tcp // start and expose actor via tcp
val sys = ActorSystem("camel") import akka.actor.{ ActorSystem, Props }
val myActor = sys.actorOf(Props[MyActor])
//#Consumer-mina
val sys = ActorSystem("camel")
val myActor = sys.actorOf(Props[MyActor])
//#Consumer-mina
}
{
//#Consumer
import akka.camel.{ CamelMessage, Consumer }
//#Consumer class MyActor extends Consumer {
class MyActor extends Consumer {
def endpointUri = "jetty:http://localhost:8877/example" def endpointUri = "jetty:http://localhost:8877/example"
def receive = { def receive = {
case msg: CamelMessage => { /* ... */} case msg: CamelMessage { /* ... */ }
case _ => { /* ... */} case _ { /* ... */ }
}
}
//#Consumer
}
{
//#Producer
import akka.actor.Actor
import akka.camel.{ Producer, Oneway }
class MyActor extends Actor with Producer with Oneway {
def endpointUri = "jms:queue:example"
}
//#Producer
} }
} }
//#Consumer
//#Producer
import akka.actor.Actor
import akka.camel.{Producer, Oneway}
class MyActor extends Actor with Producer with Oneway {
def endpointUri = "jms:queue:example"
}
//#Producer

View file

@ -320,7 +320,7 @@ object AkkaBuild extends Build {
id = "akka-docs", id = "akka-docs",
base = file("akka-docs"), base = file("akka-docs"),
dependencies = Seq(actor, testkit % "test->test", remote, cluster, slf4j, agent, transactor, dependencies = Seq(actor, testkit % "test->test", remote, cluster, slf4j, agent, transactor,
fileMailbox, mongoMailbox, redisMailbox, beanstalkMailbox, zookeeperMailbox, zeroMQ), fileMailbox, mongoMailbox, redisMailbox, beanstalkMailbox, zookeeperMailbox, zeroMQ, camel),
settings = defaultSettings ++ Seq( settings = defaultSettings ++ Seq(
unmanagedSourceDirectories in Test <<= baseDirectory { _ ** "code" get }, unmanagedSourceDirectories in Test <<= baseDirectory { _ ** "code" get },
libraryDependencies ++= Dependencies.docs, libraryDependencies ++= Dependencies.docs,