- /**
- * Execute an operation on a remote actor and wait for it's response
- * @param actor
- * @param message
- * @param askDuration
- * @param awaitDuration
- * @return
- */
- public static Object executeRemoteOperation(ActorSelection actor, Object message,
- FiniteDuration askDuration, FiniteDuration awaitDuration) throws Exception{
- Future<Object> future =
- ask(actor, message, new Timeout(askDuration));
- return Await.result(future, awaitDuration);
- }