Ejemplo n.º 1
0
        public void Stop()
        {
            cancellationTokenSource.Cancel();
            task.Wait(cancellationTokenSource.Token);

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