Rearanged declaration of messages. Improvements from review. See #1722

This commit is contained in:
Patrik Nordwall 2012-01-26 09:28:37 +01:00
parent 4e0bd947be
commit 2aa72993d6
3 changed files with 135 additions and 106 deletions

View file

@ -33,6 +33,8 @@ object FaultHandlingDocSample extends App {
val worker = system.actorOf(Props[Worker], name = "worker")
val listener = system.actorOf(Props[Listener], name = "listener")
// start the work and listen on progress
// note that the listener is used as sender of the tell,
// i.e. it will receive replies from the worker
worker.tell(Start, sender = listener)
}
@ -107,8 +109,9 @@ object CounterService {
case class Increment(n: Int)
case object GetCurrentCount
case class CurrentCount(key: String, count: Long)
case object Reconnect
class ServiceUnavailable(msg: String) extends RuntimeException(msg)
private case object Reconnect
}
//#messages