Skip to content

Commit

Permalink
after merge cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
momania committed Oct 8, 2010
1 parent 53bdcd4 commit 91dbb59
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import se.scalablesolutions.akka.amqp.rpc.RPC;
import se.scalablesolutions.akka.remote.protocol.RemoteProtocol;

import se.scalablesolutions.akka.util.Function;
import se.scalablesolutions.akka.util.Procedure;
import se.scalablesolutions.akka.japi.Function;
import se.scalablesolutions.akka.japi.Procedure;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ private[amqp] class FaultTolerantConnectionActor(connectionParameters: Connectio
self.lifeCycle = Permanent
self.faultHandler = OneForOneStrategy(List(classOf[Throwable]))

self.trapExit = List(classOf[Throwable])
self.faultHandler = Some(OneForOneStrategy(None, None)) // never die

val reconnectionTimer = new Timer("%s-timer".format(self.id))

val connectionFactory: ConnectionFactory = new ConnectionFactory()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import com.google.protobuf.Message
import se.scalablesolutions.akka.actor.{Actor, ActorRef}
import Actor._
import se.scalablesolutions.akka.amqp._
import se.scalablesolutions.akka.util.Procedure
import reflect.Manifest
import se.scalablesolutions.akka.japi

object RPC {

Expand Down Expand Up @@ -44,7 +44,7 @@ object RPC {
exchangeName: String,
routingKey: String,
serializer: RpcServerSerializer[I, O],
requestHandler: se.scalablesolutions.akka.util.Function[I,O]): RpcServerHandle = {
requestHandler: japi.Function[I,O]): RpcServerHandle = {
newRpcServer(connection, exchangeName, routingKey, serializer, requestHandler.apply _)
}

Expand All @@ -53,7 +53,7 @@ object RPC {
exchangeName: String,
routingKey: String,
serializer: RpcServerSerializer[I, O],
requestHandler: se.scalablesolutions.akka.util.Function[I,O],
requestHandler: Function[I,O],
queueName: String): RpcServerHandle = {
newRpcServer(connection, exchangeName, routingKey, serializer, requestHandler.apply _, Some(queueName))
}
Expand All @@ -63,7 +63,7 @@ object RPC {
exchangeName: String,
routingKey: String,
serializer: RpcServerSerializer[I, O],
requestHandler: se.scalablesolutions.akka.util.Function[I,O],
requestHandler: japi.Function[I,O],
channelParameters: ChannelParameters): RpcServerHandle = {
newRpcServer(connection, exchangeName, routingKey, serializer, requestHandler.apply _, None, Some(channelParameters))
}
Expand All @@ -73,7 +73,7 @@ object RPC {
exchangeName: String,
routingKey: String,
serializer: RpcServerSerializer[I, O],
requestHandler: se.scalablesolutions.akka.util.Function[I,O],
requestHandler: japi.Function[I,O],
queueName: String,
channelParameters: ChannelParameters): RpcServerHandle = {
newRpcServer(connection, exchangeName, routingKey, serializer, requestHandler.apply _, Some(queueName), Some(channelParameters))
Expand Down Expand Up @@ -122,12 +122,12 @@ object RPC {
}

// Needed for Java API usage
def callAsync(request: O, responseHandler: Procedure[I]): Unit = {
def callAsync(request: O, responseHandler: japi.Procedure[I]): Unit = {
callAsync(request, 5000, responseHandler)
}

// Needed for Java API usage
def callAsync(request: O, timeout: Long, responseHandler: Procedure[I]): Unit = {
def callAsync(request: O, timeout: Long, responseHandler: japi.Procedure[I]): Unit = {
callAsync(request, timeout){
case Some(response) => responseHandler.apply(response)
}
Expand All @@ -147,7 +147,7 @@ object RPC {
def newProtobufRpcServer[I <: Message, O <: Message](
connection: ActorRef,
exchangeName: String,
requestHandler: se.scalablesolutions.akka.util.Function[I,O],
requestHandler: japi.Function[I,O],
resultClazz: Class[I]): RpcServerHandle = {

implicit val manifest = Manifest.classType[I](resultClazz)
Expand All @@ -158,7 +158,7 @@ object RPC {
def newProtobufRpcServer[I <: Message, O <: Message](
connection: ActorRef,
exchangeName: String,
requestHandler: se.scalablesolutions.akka.util.Function[I,O],
requestHandler: japi.Function[I,O],
routingKey: String,
resultClazz: Class[I]): RpcServerHandle = {

Expand All @@ -170,7 +170,7 @@ object RPC {
def newProtobufRpcServer[I <: Message, O <: Message](
connection: ActorRef,
exchangeName: String,
requestHandler: se.scalablesolutions.akka.util.Function[I,O],
requestHandler: japi.Function[I,O],
routingKey: String,
queueName: String,
resultClazz: Class[I]): RpcServerHandle = {
Expand Down Expand Up @@ -240,22 +240,22 @@ object RPC {
// Needed for Java API usage
def newStringRpcServer(connection: ActorRef,
exchangeName: String,
requestHandler: se.scalablesolutions.akka.util.Function[String,String]): RpcServerHandle = {
requestHandler: japi.Function[String,String]): RpcServerHandle = {
newStringRpcServer(connection, exchangeName, requestHandler.apply _)
}

// Needed for Java API usage
def newStringRpcServer(connection: ActorRef,
exchangeName: String,
requestHandler: se.scalablesolutions.akka.util.Function[String,String],
requestHandler: japi.Function[String,String],
routingKey: String): RpcServerHandle = {
newStringRpcServer(connection, exchangeName, requestHandler.apply _, Some(routingKey))
}

// Needed for Java API usage
def newStringRpcServer(connection: ActorRef,
exchangeName: String,
requestHandler: se.scalablesolutions.akka.util.Function[String,String],
requestHandler: japi.Function[String,String],
routingKey: String,
queueName: String): RpcServerHandle = {
newStringRpcServer(connection, exchangeName, requestHandler.apply _, Some(routingKey), Some(queueName))
Expand Down

0 comments on commit 91dbb59

Please sign in to comment.