public SubscriptionManager(IInteractorManager interactorManager, INotificationManager notificationManager)
        {
            _notificationManager = notificationManager;

            _repository       = new SubscriptionRepository();
            _publisherManager = new PublisherManager(interactorManager);

            interactorManager.ClosedInteractors  += OnClosedInteractor;
            interactorManager.FaultedInteractors += OnFaultedInteractor;

            notificationManager.NewNotificationRequests += OnNewNotificationRequest;

            _publisherManager.StalePublishers += OnStalePublishers;
        }
Esempio n. 2
0
        public Server(IPEndPoint endPoint)
        {
            _eventQueue = new EventQueue <InteractorEventArgs>(_cancellationTokenSource.Token);
            _eventQueue.OnItemDequeued += OnInteractorEvent;

            _heartbeatTimer = new Timer(HeartbeatCallback);

            _acceptor = new Acceptor(endPoint, _eventQueue, _cancellationTokenSource.Token);

            _interactorManager = new InteractorManager();

            _notificationManager = new NotificationManager(_interactorManager);

            _subscriptionManager = new SubscriptionManager(_interactorManager, _notificationManager);
        }
Esempio n. 3
0
 public NotificationManager(IInteractorManager interactorManager)
 {
     _repository = new NotificationRepository();
     interactorManager.ClosedInteractors  += OnClosedInteractor;
     interactorManager.FaultedInteractors += OnFaultedInteractor;
 }
 public PublisherManager(IInteractorManager interactorManager)
 {
     _repository = new PublisherRepository();
     interactorManager.ClosedInteractors  += OnClosedInteractor;
     interactorManager.FaultedInteractors += OnFaultedInteractor;
 }