/// <summary> /// Handles the daemon MSG create. /// </summary> /// <param name="message">The message.</param> private void HandleDaemonMsgCreate(DaemonMsgCreate message) { //TODO: find out what format "Path" should have var supervisor = (InternalActorRef)message.Supervisor; Props props = message.Props; ActorPath childPath = ActorPath.Parse(message.Path); IEnumerable <string> subPath = childPath.Elements.Drop(1); ActorPath path = Path / subPath; InternalActorRef actor = System.Provider.ActorOf(System, props, supervisor, path); string childName = subPath.Join("/"); AddChild(childName, actor); actor.Tell(new Watch(actor, this)); }
/// <summary> /// Handles the daemon MSG create. /// </summary> /// <param name="message">The message.</param> private void HandleDaemonMsgCreate(DaemonMsgCreate message) { var supervisor = (IInternalActorRef)message.Supervisor; var parent = supervisor; Props props = message.Props; ActorPath childPath; if (ActorPath.TryParse(message.Path, out childPath)) { IEnumerable <string> subPath = childPath.ElementsWithUid.Drop(1); //drop the /remote ActorPath p = Path / subPath; var s = subPath.Join("/"); var i = s.IndexOf("#", StringComparison.Ordinal); var childName = i < 0 ? s : s.Substring(0, i); // extract the name without the UID var localProps = props; //.WithDeploy(new Deploy(Scope.Local)); bool isTerminating = !_terminating.WhileOff(() => { IInternalActorRef actor = _system.Provider.ActorOf(_system, localProps, supervisor, p, false, message.Deploy, true, false); AddChild(childName, actor); actor.SendSystemMessage(new Watch(actor, this)); actor.Start(); if (AddChildParentNeedsWatch(parent, actor)) { //TODO: figure out why current transport is not set when this message is sent parent.SendSystemMessage(new Watch(parent, this)); } }); if (isTerminating) { Log.Error("Skipping [{0}] to RemoteSystemDaemon on [{1}] while terminating", message, p.Address); } } else { Log.Debug("remote path does not match path from message [{0}]", message); } }
/// <summary> /// Handles the daemon MSG create. /// </summary> /// <param name="message">The message.</param> private void HandleDaemonMsgCreate(DaemonMsgCreate message) { var supervisor = (InternalActorRef)message.Supervisor; Props props = message.Props; ActorPath childPath; if (ActorPath.TryParse(message.Path, out childPath)) { IEnumerable <string> subPath = childPath.Elements; ActorPath path = Path / subPath; var localProps = props; //.WithDeploy(new Deploy(Scope.Local)); InternalActorRef actor = System.Provider.ActorOf(System, localProps, supervisor, path, false, message.Deploy, true, false); string childName = subPath.Join("/"); AddChild(childName, actor); actor.Tell(new Watch(actor, this)); actor.Start(); } else { Log.Debug("remote path does not match path from message [{0}]", message); } }
/// <summary> /// Handles the daemon MSG create. /// </summary> /// <param name="message">The message.</param> private void HandleDaemonMsgCreate(DaemonMsgCreate message) { var supervisor = (IInternalActorRef) message.Supervisor; var parent = supervisor; Props props = message.Props; ActorPath childPath; if(ActorPath.TryParse(message.Path, out childPath)) { IEnumerable<string> subPath = childPath.Elements.Drop(1); //drop the /remote ActorPath path = Path/subPath; var localProps = props; //.WithDeploy(new Deploy(Scope.Local)); bool isTerminating = !_terminating.WhileOff(() => { IInternalActorRef actor = _system.Provider.ActorOf(_system, localProps, supervisor, path, false, message.Deploy, true, false); string childName = subPath.Join("/"); AddChild(childName, actor); actor.Tell(new Watch(actor, this)); actor.Start(); if (AddChildParentNeedsWatch(parent, actor)) { //TODO: figure out why current transport is not set when this message is sent parent.Tell(new Watch(parent, this),this); } }); if (isTerminating) { Log.Error("Skipping [{0}] to RemoteSystemDaemon on [{1}] while terminating", message, path.Address); } } else { Log.Debug("remote path does not match path from message [{0}]", message); } }
/// <summary> /// Handles the daemon MSG create. /// </summary> /// <param name="message">The message.</param> private void HandleDaemonMsgCreate(DaemonMsgCreate message) { var supervisor = (InternalActorRef) message.Supervisor; Props props = message.Props; ActorPath childPath; if(ActorPath.TryParse(message.Path, out childPath)) { IEnumerable<string> subPath = childPath.Elements.Drop(1); //drop the /remote ActorPath path = Path/subPath; var localProps = props; //.WithDeploy(new Deploy(Scope.Local)); InternalActorRef actor = _system.Provider.ActorOf(_system, localProps, supervisor, path, false, message.Deploy, true, false); string childName = subPath.Join("/"); AddChild(childName, actor); actor.Tell(new Watch(actor, this)); actor.Start(); } else { Log.Debug("remote path does not match path from message [{0}]", message); } }
/// <summary> /// Handles the daemon MSG create. /// </summary> /// <param name="message">The message.</param> private void HandleDaemonMsgCreate(DaemonMsgCreate message) { //TODO: find out what format "Path" should have var supervisor = (InternalActorRef) message.Supervisor; Props props = message.Props; ActorPath childPath = ActorPath.Parse(message.Path); IEnumerable<string> subPath = childPath.Elements.Drop(1); ActorPath path = Path/subPath; InternalActorRef actor = System.Provider.ActorOf(System, props, supervisor, path); string childName = subPath.Join("/"); AddChild(childName, actor); actor.Tell(new Watch(actor, this)); }