public GatewayHttpListenerInstaller(ReadOnlySettings settings) { var installerSettings = settings.Get <InstallerSettings>(); channelManager = installerSettings.ChannelManager; enabled = installerSettings.Enabled; }
public GatewayMessageSender(string inputAddress, IManageReceiveChannels channelManager, MessageNotifier notifier, string localAddress, ConfigurationBasedSiteRouter configRouter) { this.configRouter = configRouter; messageNotifier = notifier; this.localAddress = localAddress; this.channelManager = channelManager; this.inputAddress = inputAddress; }
static void CheckForNonWildcardDefaultChannel(IManageReceiveChannels channelManager) { var defaultChannel = channelManager.GetDefaultChannel(); if (defaultChannel.Address.Contains("*") || defaultChannel.Address.Contains("+")) { throw new Exception($"Default channel {defaultChannel.Address} is using a wildcard uri. Please add an extra channel with a fully qualified non-wildcard uri in order for replies to be transmitted properly."); } }
public GatewayHttpListenerInstaller(ReadOnlySettings settings) { if (!settings.TryGet <InstallerSettings>(out var installerSettings)) { return; } channelManager = installerSettings.ChannelManager; enabled = installerSettings.Enabled; }
public GatewayReceiverStartupTask(IManageReceiveChannels channelManager, Func <string, IChannelReceiver> channelReceiverFactory, EndpointRouter endpointRouter, IDispatchMessages dispatcher, IDeduplicateMessages deduplicator, IDataBus databus, string replyToAddress) { dispatchMessages = dispatcher; this.deduplicator = deduplicator; this.databus = databus; this.endpointRouter = endpointRouter; manageReceiveChannels = channelManager; this.channelReceiverFactory = channelReceiverFactory; this.replyToAddress = replyToAddress; }
public GatewayReceiverStartupTask(IManageReceiveChannels channelManager, Func <string, IChannelReceiver> channelReceiverFactory, EndpointRouter endpointRouter, IMessageDispatcher dispatcher, IGatewayDeduplicationStorage deduplicationStorage, IDataBus databus, string replyToAddress, TransportTransactionMode transportTransactionMode) { dispatchMessages = dispatcher; this.deduplicationStorage = deduplicationStorage; this.databus = databus; this.endpointRouter = endpointRouter; manageReceiveChannels = channelManager; this.channelReceiverFactory = channelReceiverFactory; this.replyToAddress = replyToAddress; this.transportTransactionMode = transportTransactionMode; }
public void SetUp() { var section = ConfigurationManager.GetSection(typeof(GatewayConfig).Name) as GatewayConfig; config = new ConfigurationBasedChannelManager { ReceiveChannels = section.GetChannels().ToList() }; activeChannels = config.GetReceiveChannels(); defaultChannel = config.GetDefaultChannel(); }
static void RegisterChannels(FeatureConfigurationContext context, IManageReceiveChannels channelManager, out Func <string, IChannelSender> channelSenderFactory, out Func <string, IChannelReceiver> channelReceiverFactory) { var usingCustomChannelProviders = context.Settings.HasSetting("GatewayChannelReceiverFactory") || context.Settings.HasSetting("GatewayChannelSenderFactory"); if (usingCustomChannelProviders) { channelReceiverFactory = context.Settings.Get <Func <string, IChannelReceiver> >("GatewayChannelReceiverFactory"); channelSenderFactory = context.Settings.Get <Func <string, IChannelSender> >("GatewayChannelSenderFactory"); return; } CheckForNonWildcardDefaultChannel(channelManager); channelReceiverFactory = s => new ChannelReceiverFactory(typeof(HttpChannelReceiver)).GetReceiver(s); channelSenderFactory = s => new ChannelSenderFactory(typeof(HttpChannelSender)).GetSender(s); var installerSettings = context.Settings.Get <InstallerSettings>(); installerSettings.ChannelManager = channelManager; installerSettings.Enabled = true; }
public void SetUp() { config = new ConfigurationBasedChannelManager(); activeChannels = config.GetReceiveChannels(); defaultChannel = config.GetDefaultChannel(); }