public void Stop() { cancellationTokenSource.Cancel(); task.Wait(cancellationTokenSource.Token); ActiveMqSchedulerManagementJobProcessor.Stop(); }
private void RunDeferredMessageCleanup(CancellationToken token) { while (!token.IsCancellationRequested) { ActiveMqSchedulerManagementJobProcessor.ProcessAllJobs(token); Thread.Sleep(100); } }
public void Start() { ActiveMqSchedulerManagementJobProcessor.Start(); cancellationTokenSource = new CancellationTokenSource(); var token = cancellationTokenSource.Token; task = Task.Factory.StartNew(() => RunDeferredMessageCleanup(token), token, TaskCreationOptions.LongRunning, TaskScheduler.Current); }
public void SetUp() { this.activeMqSchedulerManagementCommandsMock = new Mock<IActiveMqSchedulerManagementCommands>(); this.testee = new ActiveMqSchedulerManagementJobProcessor(this.activeMqSchedulerManagementCommandsMock.Object); }
public bool Handle(TransportMessage message) { ActiveMqSchedulerManagementJobProcessor.HandleTransportMessage(message); return(true); }