public static IBus CreateFakeBus(int busReceptionPort, string busName, PeerId busId, int directoryServicePort, string directoryServiceName,PeerId directoryServiceId, IAssemblyScanner assemblyScanner = null, IPeerConfiguration peerconfig = null, IContainer container = null) { container = container ?? new Container(); return BusFactory.CreateBus(container, containerConfigurationExpression: ctx => { ctx.For <ZmqTransportConfiguration>() .Use( new DummyTransportConfig( busReceptionPort)); ctx.For <IBusBootstrapperConfiguration >().Use(new DummyBootstrapperConfig { DirectoryServiceEndpoint = "tcp://localhost:" + directoryServicePort, DirectoryServiceName = directoryServiceName, DirectoryServiceId = directoryServiceId }); ctx.For<IPeerConfiguration>().Use( peerconfig ?? new DummyPeerConfig(busName,busId, null)); ctx.For<IAssemblyScanner>().Use( assemblyScanner ?? new AssemblyScanner()); }); }
public BusBootstrapper(IAssemblyScanner assemblyScanner, ZmqTransportConfiguration zmqTransportConfiguration, IBusBootstrapperConfiguration bootstrapperConfiguration, IMessageSender messageSender, IPeerManager peerManager, ISubscriptionManager subscriptionManager, IPeerConfiguration peerConfiguration) { _assemblyScanner = assemblyScanner; _zmqTransportConfiguration = zmqTransportConfiguration; _bootstrapperConfiguration = bootstrapperConfiguration; _messageSender = messageSender; _peerManager = peerManager; _subscriptionManager = subscriptionManager; _peerConfiguration = peerConfiguration; }
public ReliabilityCoordinator(IPeerManager peerManager, IPeerConfiguration peerConfiguration, IAssemblyScanner assemblyScanner) { _peerManager = peerManager; _peerConfiguration = peerConfiguration; _assemblyScanner = assemblyScanner; _peerManager.PeerConnected += OnPeerChange; var messageOptionses = _assemblyScanner.GetMessageOptions(); foreach (var messageOptionse in messageOptionses) { _messageOptions.Add(messageOptionse.MessageType.FullName, messageOptionse); } }
public PeerManager(IPeerConfiguration peerConfig, IHeartbeatManager heartbeatManager) { _peerConfig = peerConfig; _heartbeatManager = heartbeatManager; _heartbeatManager.Disconnected += OnHeartbeatManagerDisconnected; }
public MessageSender(IPeerConfiguration peerConfiguration) { _peerConfiguration = peerConfiguration; }
public SequenceNumberVerifier(IPeerConfiguration peerConfiguration) { _peerConfiguration = peerConfiguration; }