org.jboss.netty
netty
diff --git a/akka-core/src/main/scala/actor/Actor.scala b/akka-core/src/main/scala/actor/Actor.scala
index 5cbe7688cd..3bf6ee12dd 100644
--- a/akka-core/src/main/scala/actor/Actor.scala
+++ b/akka-core/src/main/scala/actor/Actor.scala
@@ -171,33 +171,6 @@ object Actor extends Logging {
def receive = body
}
- /**
- * Use to create an anonymous event-driven actor with both an init block and a message loop block
- * as well as a life-cycle configuration.
- * The actor is started when created.
- * Example:
- *
- * import Actor._
- *
- * val a = actor(LifeCycle(Temporary)) {
- * ... // init stuff
- * } receive {
- * case msg => ... // handle message
- * }
- *
- */
- def actor[A](lifeCycleConfig: LifeCycle)(body: => Unit) = {
- def handler[A](body: Unit) = new {
- def receive(handler: PartialFunction[Any, Unit]) = new Actor() {
- lifeCycle = Some(lifeCycleConfig)
- start
- body
- def receive = handler
- }
- }
- handler(body)
- }
-
/**
* Use to create an anonymous event-driven remote actor.
* The actor is started when created.
@@ -216,6 +189,10 @@ object Actor extends Logging {
def receive = body
}
+ val a = actor(LifeCycle(Temporary)) {
+ case "test" => println("received test")
+ case _ => println("received unknown message")
+ }
}
/**