rework system initialization, remove remote address from LocalActorRef

- move all creation of ActorRefs into the ActorRefProvider (deadLetters,
  locker)
- rootPath does not contain remote transport address any longer in order
  to start the LocalActorRefProvider before the RemoteTransport; the
  transport address is inserted during serialization only, which enables
  us later to have more than one transport available for one actor
  system (maybe even needed for clustering)
- fix inheritance between DeadLetterActorRef and EmptyLocalActorRef
- document some start-up dependencies by reordering constructor code
- fix remote tests which used self.path for identifying remote actors
  (since that no longer includes the remote transport address)
This commit is contained in:
Roland 2012-01-27 12:14:28 +01:00
parent 52d6e5625d
commit c5fc153a10
21 changed files with 225 additions and 204 deletions

View file

@ -18,7 +18,7 @@ case class DaemonMsgWatch(watcher: ActorRef, watched: ActorRef) extends DaemonMs
*
* It acts as the brain of the remote that responds to system remote events (messages) and undertakes action.
*/
class RemoteSystemDaemon(system: ActorSystemImpl, address: Address, _path: ActorPath, _parent: InternalActorRef, _log: LoggingAdapter)
class RemoteSystemDaemon(system: ActorSystemImpl, _path: ActorPath, _parent: InternalActorRef, _log: LoggingAdapter)
extends VirtualPathContainer(system.provider, _path, _parent, _log) {
/**
@ -52,7 +52,8 @@ class RemoteSystemDaemon(system: ActorSystemImpl, address: Address, _path: Actor
message match {
case DaemonMsgCreate(factory, path, supervisor)
path match {
case ActorPathExtractor(`address`, elems) if elems.nonEmpty && elems.head == "remote"
case ActorPathExtractor(address, elems) if elems.nonEmpty && elems.head == "remote"
// TODO RK currently the extracted address is just ignored, is that okay?
// TODO RK canonicalize path so as not to duplicate it always #1446
val subpath = elems.drop(1)
val path = this.path / subpath