remove rpcclient trait...

This commit is contained in:
momania 2010-08-06 17:33:55 +02:00
parent ab5c4f8ab5
commit 6e6f1f32d2

View file

@ -52,11 +52,7 @@ object RPC {
/**
* RPC convenience
*/
trait RpcClient[O, I] {
def callService(request: O, timeout: Long = 5000): Option[I]
}
private class RpcServiceClient[O, I](client: ActorRef) extends RpcClient[O, I] {
class RpcClient[O, I](client: ActorRef){
def callService(request: O, timeout: Long = 5000): Option[I] = {
(client.!!(request, timeout)).as[I]
}
@ -101,7 +97,7 @@ object RPC {
val queueName = "%s.in".format(routingKey)
val client = newRpcClient[O, I](connection, exchangeParameters, routingKey, serializer)
new RpcServiceClient[O, I](client)
new RpcClient[O, I](client)
}
private def createProtobufFromBytes[I](bytes: Array[Byte])(implicit manifest: Manifest[I]): I = {