From 8ad5641a45a5c955d465782e9217a4880cad5ef0 Mon Sep 17 00:00:00 2001 From: Christos KK Loverdos Date: Tue, 6 Dec 2011 14:15:21 +0200 Subject: [PATCH 1/1] Remove camel dependencies --- logic/pom.xml | 18 ------------------ ...ayPingService.scala => AquariumRESTService.scala} | 12 +++++++++--- 2 files changed, 9 insertions(+), 21 deletions(-) rename logic/src/main/scala/gr/grnet/aquarium/rest/akka/service/{SprayPingService.scala => AquariumRESTService.scala} (90%) diff --git a/logic/pom.xml b/logic/pom.xml index 49a89c7..0b06b6c 100644 --- a/logic/pom.xml +++ b/logic/pom.xml @@ -169,24 +169,6 @@ - org.apache.camel - camel - 2.7.0 - - - - org.apache.camel - camel-jetty - 2.7.0 - - - - org.apache.camel - camel-http - 2.7.0 - - - se.scalablesolutions.akka akka-testkit 1.3-RC2 diff --git a/logic/src/main/scala/gr/grnet/aquarium/rest/akka/service/SprayPingService.scala b/logic/src/main/scala/gr/grnet/aquarium/rest/akka/service/AquariumRESTService.scala similarity index 90% rename from logic/src/main/scala/gr/grnet/aquarium/rest/akka/service/SprayPingService.scala rename to logic/src/main/scala/gr/grnet/aquarium/rest/akka/service/AquariumRESTService.scala index d6c8554..8588f87 100644 --- a/logic/src/main/scala/gr/grnet/aquarium/rest/akka/service/SprayPingService.scala +++ b/logic/src/main/scala/gr/grnet/aquarium/rest/akka/service/AquariumRESTService.scala @@ -39,16 +39,22 @@ import org.slf4j.LoggerFactory import cc.spray.can.HttpMethods.GET import cc.spray.can._ import akka.actor.Actor +import gr.grnet.aquarium.util.Loggable +import net.liftweb.json.JsonAST.JValue /** * * @author Christos KK Loverdos . */ -class SprayPingService(_id: String = "spray-root-service") extends Actor { - private[this] val logger = LoggerFactory.getLogger(getClass) - +class AquariumRESTService(_id: String = "spray-root-service", version: String) extends Actor with Loggable { self.id = _id + private[this] def jsonResponseOK(body: JValue, pretty: Boolean = false): HttpResponse = { + HttpResponse( + 200, + HttpHeader("Content-type", "application/json;charset=utf-8") :: Nil, + ) + } protected def receive = { case RequestContext(HttpRequest(GET, "/", _, _, _), _, responder) => responder.complete(index) -- 1.7.10.4