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
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
the example JMS queue. Producer actors may choose from the same set of Camel

View file

@ -1,39 +1,41 @@
package akka.docs.camel
import akka.actor._
import akka.camel._
object wrapper {
{
//#Consumer-mina
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 receive = {
case msg: CamelMessage => { /* ... */}
case _ => { /* ... */}
case msg: CamelMessage { /* ... */ }
case _ { /* ... */ }
}
}
// start and expose actor via tcp
import akka.actor.{ ActorSystem, Props }
val sys = ActorSystem("camel")
val myActor = sys.actorOf(Props[MyActor])
//#Consumer-mina
}
{
//#Consumer
import akka.camel.{ CamelMessage, Consumer }
class MyActor extends Consumer {
def endpointUri = "jetty:http://localhost:8877/example"
def receive = {
case msg: CamelMessage => { /* ... */}
case _ => { /* ... */}
case msg: CamelMessage { /* ... */ }
case _ { /* ... */ }
}
}
//#Consumer
}
{
//#Producer
import akka.actor.Actor
import akka.camel.{ Producer, Oneway }
@ -42,3 +44,5 @@ 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",
base = file("akka-docs"),
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(
unmanagedSourceDirectories in Test <<= baseDirectory { _ ** "code" get },
libraryDependencies ++= Dependencies.docs,