Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #5 from fommil/master

Imports in home.scala
  • Loading branch information...
commit 480631d30461e088f2563649e6e4d17b84c216a9 2 parents cf7a5ba + 593dca9
Jan Machacek authored
8 sbt/src/main/scala/org/cakesolutions/akkapatterns/api/home.scala
@@ -5,7 +5,7 @@ import spray.routing.Directives
5 5 import java.net.InetAddress
6 6 import akka.pattern.ask
7 7 import org.cakesolutions.akkapatterns.core.application.{ PoisonPill, GetImplementation, Implementation }
8   -import spray.httpx.SprayJsonSupport
  8 +import spray.httpx.SprayJsonSupport._
9 9 import spray.httpx.marshalling.MetaMarshallers
10 10
11 11 case class SystemInfo(implementation: Implementation, host: String)
@@ -19,17 +19,15 @@ class HomeService(implicit val actorSystem: ActorSystem) extends Directives with
19 19 get {
20 20 complete {
21 21 import scala.concurrent.ExecutionContext.Implicits._
22   - val futureInfo = (applicationActor ? GetImplementation()).mapTo[Implementation].map {
  22 + (applicationActor ? GetImplementation()).mapTo[Implementation].map {
23 23 SystemInfo(_, InetAddress.getLocalHost.getCanonicalHostName)
24 24 }
25   - // how to get this to implicitly return as a future marshaller of a SystemInfo marshaller?
26   - futureInfo
27 25 }
28 26 }
29 27 } ~
30 28 path("poisonpill") {
31 29 post {
32   - completeWith {
  30 + complete {
33 31 applicationActor ! PoisonPill()
34 32
35 33 "Goodbye"

0 comments on commit 480631d

Please sign in to comment.
Something went wrong with that request. Please try again.