Deprecate actorFor in favor of ActorSelection, see #3074

* Deprecate all actorFor methods
* resolveActorRef in provider
* Identify auto receive message
* Support ActorPath in actorSelection
* Support remote actor selections
* Additional tests of actor selection
* Update tests (keep most actorFor tests)
* Update samples to use actorSelection
* Updates to documentation
* Migration guide, including motivation
This commit is contained in:
Patrik Nordwall 2013-03-26 18:17:50 +01:00
parent 641e499cc4
commit 887af975ae
80 changed files with 1496 additions and 619 deletions

View file

@ -157,7 +157,7 @@ package docs.serialization {
"demonstrate serialization of ActorRefs" in {
val theActorRef: ActorRef = system.deadLetters
val theActorSystem: ActorSystem = system
val extendedSystem: ExtendedActorSystem = system.asInstanceOf[ExtendedActorSystem]
//#actorref-serializer
// Serialize
@ -168,7 +168,7 @@ package docs.serialization {
// Deserialize
// (beneath fromBinary)
val deserializedActorRef = theActorSystem actorFor identifier
val deserializedActorRef = extendedSystem.provider.resolveActorRef(identifier)
// Then just use the ActorRef
//#actorref-serializer
@ -182,7 +182,7 @@ package docs.serialization {
}
def serializeTo(ref: ActorRef, remote: Address): String =
ref.path.toSerializationFormatWithAddress(ExternalAddress(theActorSystem).addressFor(remote))
ref.path.toSerializationFormatWithAddress(ExternalAddress(extendedSystem).addressFor(remote))
//#external-address
}