示例#1
0
        public void Stop()
        {
            cancellationTokenSource.Cancel();
            task.Wait(cancellationTokenSource.Token);

            ActiveMqSchedulerManagementJobProcessor.Stop();
        }
示例#2
0
 private void RunDeferredMessageCleanup(CancellationToken token)
 {
     while (!token.IsCancellationRequested)
     {
         ActiveMqSchedulerManagementJobProcessor.ProcessAllJobs(token);
         Thread.Sleep(100);
     }
 }
示例#3
0
        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);
        }
示例#5
0
 public bool Handle(TransportMessage message)
 {
     ActiveMqSchedulerManagementJobProcessor.HandleTransportMessage(message);
     return(true);
 }