Cleaning up some of the Java samples and adding sender to the UnhandledMessage

This commit is contained in:
Viktor Klang 2011-12-20 10:52:27 +01:00
parent 2adb042bf7
commit 634147d090
5 changed files with 8 additions and 8 deletions

View file

@ -22,7 +22,7 @@ public class MyReceivedTimeoutUntypedActor extends UntypedActor {
} else if (message == Actors.receiveTimeout()) {
throw new RuntimeException("received timeout");
} else {
throw new UnhandledMessageException(message, getSelf());
unhandled(message);
}
}
}

View file

@ -16,7 +16,7 @@ public class MyUntypedActor extends UntypedActor {
if (message instanceof String)
log.info("Received String message: {}", message);
else
throw new UnhandledMessageException(message, getSelf());
unhandled(message);
}
}
//#my-untyped-actor

View file

@ -37,7 +37,7 @@ public class UntypedActorSwapper {
}
});
} else {
throw new UnhandledMessageException(message, getSelf());
unhandled(message);
}
}
}