public GatewayHttpListenerInstaller(ReadOnlySettings settings)
        {
            var installerSettings = settings.Get <InstallerSettings>();

            channelManager = installerSettings.ChannelManager;
            enabled        = installerSettings.Enabled;
        }
示例#2
0
 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;
 }
示例#3
0
        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;
        }
示例#5
0
 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;
 }
示例#7
0
        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();
        }
        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();

        }
示例#9
0
        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();
 }
示例#11
0
 public void SetUp()
 {
     config         = new ConfigurationBasedChannelManager();
     activeChannels = config.GetReceiveChannels();
     defaultChannel = config.GetDefaultChannel();
 }