Created
February 13, 2011 12:18
-
-
Save teigen/824645 to your computer and use it in GitHub Desktop.
Akka Comet Actor Bridge. Akka actor follows comet actor lifecycle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait AkkaCometActor extends CometActor { | |
implicit val optionSelf:Option[ActorRef] = Some(Actor.actorOf(new Actor{ | |
protected def receive = { | |
case a => AkkaCometActor.this ! a | |
} | |
})) | |
override def localSetup { | |
super.localSetup | |
optionSelf.foreach(_.start) | |
} | |
override def localShutdown { | |
super.localShutdown | |
optionSelf.foreach(_.stop) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment