Exemplo n.º 1
0
 public StitchInstanceManager(StitchesConfiguration configuration, StitchFileSystem fileSystem)
 {
     _fileSystem = fileSystem;
     // TODO: We need a way to get the unique string name of the node at this point.
     _adaptorFactory = new StitchAdaptorFactory(configuration, _fileSystem);
     _adaptors       = new StitchAdaptorCollection();
 }
Exemplo n.º 2
0
        public StitchInstanceManager(StitchFileSystem fileSystem, StitchAdaptorFactory adaptorFactory)
        {
            _fileSystem = fileSystem;

            // TODO: We need a way to get the unique string name of the node at this point.
            _adaptorFactory = adaptorFactory;
            _adaptors       = new StitchAdaptorCollection();
        }
Exemplo n.º 3
0
        public StitchesService(CrossStitchCore core, IDataRepository data, StitchFileSystem fileSystem, StitchInstanceManager stitchInstanceManager, IModuleLog log, IStitchEventNotifier notifier)
        {
            _fileSystem = fileSystem;
            _data       = data;
            _core       = core;
            _notifier   = notifier;
            _log        = log;

            _stitchInstanceManager = stitchInstanceManager;
        }
Exemplo n.º 4
0
        public StitchesModule(CrossStitchCore core, StitchesConfiguration configuration = null)
        {
            _messageBus   = core.MessageBus;
            configuration = configuration ?? StitchesConfiguration.GetDefault();
            var fileSystem = new StitchFileSystem(configuration, new DateTimeVersionManager());
            var manager    = new StitchInstanceManager(configuration, fileSystem);
            var log        = new ModuleLog(_messageBus, Name);
            var observer   = new StitchEventObserver(_messageBus, log);
            var data       = new DataHelperClient(core.MessageBus);
            var notifier   = new StitchEventNotifier(_messageBus);

            _service = new StitchesService(core, data, fileSystem, manager, observer, log, notifier);
        }
Exemplo n.º 5
0
        public StitchesService(CrossStitchCore core, IDataRepository data, StitchFileSystem fileSystem, StitchInstanceManager stitchInstanceManager, StitchEventObserver observer, IModuleLog log, IStitchEventNotifier notifier)
        {
            _fileSystem = fileSystem;
            _data       = data;
            _core       = core;
            _notifier   = notifier;
            _log        = log;

            _stitchInstanceManager = stitchInstanceManager;
            _stitchInstanceManager.StitchStateChange       += observer.StitchInstancesOnStitchStateChanged;
            _stitchInstanceManager.HeartbeatReceived       += observer.StitchInstanceManagerOnHeartbeatReceived;
            _stitchInstanceManager.LogsReceived            += observer.StitchInstanceManagerOnLogsReceived;
            _stitchInstanceManager.RequestResponseReceived += observer.StitchInstanceManagerOnRequestResponseReceived;
            _stitchInstanceManager.DataMessageReceived     += observer.StitchInstanceManagerOnDataMessageReceived;
        }
Exemplo n.º 6
0
        public StitchesModule(CrossStitchCore core, StitchesConfiguration configuration = null)
        {
            configuration = configuration ?? StitchesConfiguration.GetDefault();
            var log  = new ModuleLog(core.MessageBus, Name);
            var data = new DataHelperClient(core.MessageBus);

            var observer       = new StitchEventObserver(core.MessageBus, data, log);
            var fileSystem     = new StitchFileSystem(configuration, new DateTimeVersionManager());
            var adaptorFactory = new StitchAdaptorFactory(core, configuration, fileSystem, log, observer);
            var manager        = new StitchInstanceManager(fileSystem, adaptorFactory);

            var notifier = new StitchEventNotifier(core.MessageBus);

            _service       = new StitchesService(core, data, fileSystem, manager, log, notifier);
            _subscriptions = new SubscriptionCollection(core.MessageBus);
        }