public NotificationManager(InteractorManager interactorManager, ILoggerFactory loggerFactory) { _logger = loggerFactory.CreateLogger <NotificationManager>(); _repository = new NotificationRepository(); interactorManager.ClosedInteractors += OnClosedInteractor; interactorManager.FaultedInteractors += OnFaultedInteractor; }
public PublisherManager( InteractorManager interactorManager, ILoggerFactory loggerFactory) { _logger = loggerFactory.CreateLogger <PublisherManager>(); _repository = new PublisherRepository(); interactorManager.ClosedInteractors += OnClosedInteractor; interactorManager.FaultedInteractors += OnFaultedInteractor; }
internal SubscriptionManager(InteractorManager interactorManager, NotificationManager notificationManager) { _repository = new SubscriptionRepository(); _interactorManager = interactorManager; _notificationManager = notificationManager; _publisherManager = new PublisherManager(_interactorManager); interactorManager.ClosedInteractors += OnClosedInteractor; interactorManager.FaultedInteractors += OnFaultedInteractor; interactorManager.AuthorizationResponses += OnAuthorizationResponse; notificationManager.NewNotificationRequests += OnNewNotificationRequest; _publisherManager.StalePublishers += OnStaleFeedTopics; }
public Server(IPEndPoint endPoint, DistributorRole distributorRole) { DistributorRole = distributorRole; _eventQueue = new EventQueue <InteractorEventArgs>(_cancellationTokenSource.Token); _eventQueue.OnItemDequeued += OnInteractorEvent; _heartbeatTimer = new Timer(HeartbeatCallback); _acceptor = new Acceptor(endPoint, distributorRole, _eventQueue, _cancellationTokenSource.Token); _interactorManager = new InteractorManager(distributorRole); _notificationManager = new NotificationManager(_interactorManager); _subscriptionManager = new SubscriptionManager(_interactorManager, _notificationManager); }
public SubscriptionManager( InteractorManager interactorManager, NotificationManager notificationManager, ILoggerFactory loggerFactory) { _logger = loggerFactory.CreateLogger <SubscriptionManager>(); _repository = new SubscriptionRepository(); _interactorManager = interactorManager; _notificationManager = notificationManager; _publisherManager = new PublisherManager(interactorManager, loggerFactory); interactorManager.ClosedInteractors += OnClosedInteractor; interactorManager.FaultedInteractors += OnFaultedInteractor; interactorManager.AuthorizationResponses += OnAuthorizationResponse; notificationManager.NewNotificationRequests += OnNewNotificationRequest; _publisherManager.StalePublishers += OnStalePublishers; }
public Server( IPEndPoint endPoint, IAuthenticator authenticator, X509Certificate2?certificate, DistributorRole distributorRole, ILoggerFactory loggerFactory) { _logger = loggerFactory.CreateLogger <Server>(); _eventQueue = new EventQueue <InteractorEventArgs>(loggerFactory, _tokenSource.Token); _eventQueue.OnItemDequeued += OnInteractorEvent; _heartbeatTimer = new Timer(HeartbeatCallback); _acceptor = new Acceptor( endPoint, certificate, authenticator, distributorRole, _eventQueue, loggerFactory, _tokenSource.Token); _interactorManager = new InteractorManager(distributorRole, loggerFactory); _notificationManager = new NotificationManager(_interactorManager, loggerFactory); _subscriptionManager = new SubscriptionManager( _interactorManager, _notificationManager, loggerFactory); _heartbeatInteractor = new Interactor( new MemoryStream(), "Heartbeat", new RoleManager(new DistributorRole(Role.Publish, Role.Authorize | Role.Notify | Role.Subscribe, false, null), "localhost", "admin", null, null), _eventQueue, loggerFactory.CreateLogger <Interactor>(), _tokenSource.Token); }
public NotificationManager(InteractorManager interactorManager) { _repository = new NotificationRepository(); interactorManager.ClosedInteractors += OnClosedInteractor; interactorManager.FaultedInteractors += OnFaultedInteractor; }
public PublisherManager(InteractorManager interactorManager) { _repository = new PublisherRepository(); interactorManager.ClosedInteractors += OnClosedInteractor; interactorManager.FaultedInteractors += OnFaultedInteractor; }