Pulling out _resolveMethod_ from NettyRemoteSupport and moving it into ReflectiveAccess

This commit is contained in:
Viktor Klang 2011-03-14 12:17:59 +01:00
parent b5b46aaff0
commit cce0fa8b8f
2 changed files with 24 additions and 1 deletions

View file

@ -927,7 +927,8 @@ class RemoteServerHandler(
val (argClasses, args) = MessageSerializer.deserialize(request.getMessage).asInstanceOf[Tuple2[Array[Class[_]],Array[AnyRef]]]
try {
val messageReceiver = typedActor.getClass.getDeclaredMethod(typedActorInfo.getMethod, argClasses: _*)
val messageReceiver = ReflectiveAccess.resolveMethod(typedActor.getClass, typedActorInfo.getMethod, argClasses)
if (request.getOneWay) messageReceiver.invoke(typedActor, args: _*)
else {
//Sends the response