Permalink
Browse files

import implicits for home

  • Loading branch information...
1 parent e371832 commit e9bf46dc4529becda0ceb00c43be179037937214 @fommil fommil committed Oct 25, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 sbt/src/main/scala/org/cakesolutions/akkapatterns/api/home.scala
View
5 sbt/src/main/scala/org/cakesolutions/akkapatterns/api/home.scala
@@ -5,7 +5,7 @@ import spray.routing.Directives
import java.net.InetAddress
import akka.pattern.ask
import org.cakesolutions.akkapatterns.core.application.{ PoisonPill, GetImplementation, Implementation }
-import spray.httpx.SprayJsonSupport
+import spray.httpx.SprayJsonSupport._
import spray.httpx.marshalling.MetaMarshallers
case class SystemInfo(implementation: Implementation, host: String)
@@ -22,14 +22,13 @@ class HomeService(implicit val actorSystem: ActorSystem) extends Directives with
val futureInfo = (applicationActor ? GetImplementation()).mapTo[Implementation].map {
SystemInfo(_, InetAddress.getLocalHost.getCanonicalHostName)
}
- // how to get this to implicitly return as a future marshaller of a SystemInfo marshaller?
futureInfo
}
}
} ~
path("poisonpill") {
post {
- completeWith {
+ complete {
applicationActor ! PoisonPill()
"Goodbye"

0 comments on commit e9bf46d

Please sign in to comment.