Created
May 15, 2015 11:43
-
-
Save pjazdzewski1990/a245ee3a5ff78feff836 to your computer and use it in GitHub Desktop.
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
class CreateGameRequestActor extends Actor { | |
gameManager ! GameManager.CreateGame | |
context.setReceiveTimeout(timeout) | |
override def receive = { | |
case GameManager.GameCreated(id) => | |
ctx.complete(StatusCodes.Created, CreateGameResponseData(id.value)) | |
context stop self | |
case ReceiveTimeout => | |
ctx.complete(StatusCodes.RequestTimeout) | |
context stop self | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment