SetTempContainer() public method

public SetTempContainer ( IInternalActorRef tempContainer ) : void
tempContainer IInternalActorRef
return void
 public void Getting_temp_child_Should_return_tempContainer()
 {
     var props = Props.Create<GuardianActor>(new OneForOneStrategy(e => Directive.Stop));
     var rootGuardianActorRef = new RootGuardianActorRef(sys, props, _dispatcher, () => sys.Mailboxes.FromConfig(""), ActorRef.Nobody, _rootActorPath, _deadLetters, _emptyExtraNames);
     var tempContainer = new DummyActorRef(_rootActorPath / "temp");
     rootGuardianActorRef.SetTempContainer(tempContainer);
     var actorRef = rootGuardianActorRef.GetSingleChild("temp");
     Assert.Same(tempContainer, actorRef);
 }
Beispiel #2
0
        public void Init(ActorSystemImpl system)
        {
            _system = system;
            //The following are the lazy val statements in Akka
            var defaultDispatcher = system.Dispatchers.DefaultGlobalDispatcher;

            _defaultMailbox = () => new ConcurrentQueueMailbox(); //TODO:system.Mailboxes.FromConfig(Mailboxes.DefaultMailboxId)
            _rootGuardian   = CreateRootGuardian(system);
            _tempContainer  = new VirtualPathContainer(system.Provider, _tempNode, _rootGuardian, _log);
            _rootGuardian.SetTempContainer(_tempContainer);
            _userGuardian   = CreateUserGuardian(_rootGuardian, "user");
            _systemGuardian = CreateSystemGuardian(_rootGuardian, "system", _userGuardian);
            //End of lazy val

            _rootGuardian.Start();
            // chain death watchers so that killing guardian stops the application
            _systemGuardian.Tell(new Watch(_userGuardian, _systemGuardian));    //Should be SendSystemMessage
            _rootGuardian.Tell(new Watch(_systemGuardian, _rootGuardian));      //Should be SendSystemMessage
            _eventStream.StartDefaultLoggers(_system);
        }
        public void Init(ActorSystemImpl system)
        {
            _system = system;
            //The following are the lazy val statements in Akka
            var defaultDispatcher = system.Dispatchers.DefaultGlobalDispatcher;
            _defaultMailbox = () => new ConcurrentQueueMailbox(); //TODO:system.Mailboxes.FromConfig(Mailboxes.DefaultMailboxId)
            _rootGuardian = CreateRootGuardian(system);
            _tempContainer = new VirtualPathContainer(system.Provider, _tempNode, _rootGuardian, _log);
            _rootGuardian.SetTempContainer(_tempContainer);
            _userGuardian = CreateUserGuardian(_rootGuardian, "user");
            _systemGuardian = CreateSystemGuardian(_rootGuardian, "system", _userGuardian);
            //End of lazy val

            _rootGuardian.Start();
            // chain death watchers so that killing guardian stops the application
            _systemGuardian.SendSystemMessage(new Watch(_userGuardian, _systemGuardian)); 
            _rootGuardian.SendSystemMessage(new Watch(_systemGuardian, _rootGuardian)); 
            _eventStream.StartDefaultLoggers(_system);
        }