public void Initialize() { this.InitializeMappings(); this.InitializeConfiguration(); this.state = KernelState.initialized; }
public void PublishStatus(Message request, PublisherSocket ioPub, KernelState statusValue) { Message message = new Message(MessageType.Status, new StatusContent(statusValue), request.Header); this._logger.LogInformation(string.Format("Sending message to IOPub {0}", JsonConvert.SerializeObject(message))); ioPub.SendMessage(message); this._logger.LogInformation("Message Sent"); }
private Task SetNewStateAsync(KernelState newState) { Log.Info($"Kernel state changed from {State} to {newState}"); State = newState; _messageHub.SendMessage(new KernelStateChangedMessage(newState)); return Task.CompletedTask; }
public Kernel(Configuration.ICoreConfiguration configuration, Communication.ICoreService service) { if (configuration == null) { throw new ArgumentException("configuration object must be provided", "configuration"); } this.state = KernelState.initializing; this.configuration = configuration; this.service = service ?? this; this.backends = new Dictionary <Core.Identity.DomainIdentity, Backend.Infrastructure.IBackend>(); this.observableUserIdentities = new ObservableCollection <Identity.UserIdentity>(); }
public StatusContent(KernelState state) { ExecutionState = state; }
public KernelStateChangedMessage(KernelState newState) { NewState = newState; }