Created
August 29, 2012 20:17
-
-
Save RayRoestenburg/3518294 to your computer and use it in GitHub Desktop.
A node trait
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 Node { actor:Actor => | |
def send(actorRef:ActorRef, m:Any) { actorRef.tell(m) } | |
def reply(m:Any) { sender ! m } | |
def forward(actorRef:ActorRef, m:Any) { actorRef.forward(m) } | |
def actorOf(props:Props):ActorRef = actor.context.actorOf(props) | |
def actorFor(actorPath:ActorPath):ActorRef = actor.context.actorFor(actorPath) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment