示例#1
0
        protected BaseHost(IHostConfiguration hostConfiguration, IHostTopology hostTopology)
        {
            _hostConfiguration = hostConfiguration;
            _hostTopology      = hostTopology;

            _receiveEndpoints = new ReceiveEndpointCollection();
        }
示例#2
0
        public HttpHost(IHttpHostConfiguration hostConfiguration, IHostTopology hostTopology)
            : base(hostConfiguration, hostTopology)
        {
            _hostConfiguration = hostConfiguration;
            _hostTopology      = hostTopology;

            _httpHostContextSupervisor = new HttpHostContextSupervisor(hostConfiguration);
        }
示例#3
0
        public HttpHost(HttpHostSettings hostSettings, IHostTopology topology)
        {
            _settings = hostSettings;
            Topology  = topology;

            ReceiveEndpoints = new ReceiveEndpointCollection();

            _httpHostCache = new HttpHostCache(Settings);
        }
        public InMemoryHostConfiguration(IInMemoryBusConfiguration busConfiguration, Uri baseAddress, int transportConcurrencyLimit, IHostTopology hostTopology)
        {
            _busConfiguration = busConfiguration;

            Topology    = hostTopology;
            HostAddress = baseAddress ?? new Uri("loopback://localhost/");

            _host = new InMemoryHost(this, transportConcurrencyLimit);
        }
        public HttpHostConfiguration(IHttpBusConfiguration busConfiguration, HttpHostSettings settings, IHostTopology hostTopology)
        {
            _busConfiguration = busConfiguration;
            _settings         = settings;
            _hostTopology     = hostTopology;

            HostAddress = settings.GetInputAddress();

            _host = new HttpHost(this);
        }
示例#6
0
        public InMemoryHost(int concurrencyLimit, IHostTopology topology, Uri baseAddress = null)
        {
            Topology = topology;
            _baseUri = baseAddress ?? new Uri("loopback://localhost/");

            _messageFabric = new MessageFabric(concurrencyLimit);

            _receiveEndpoints = new ReceiveEndpointCollection();

            var cache = new GreenCache <InMemorySendTransport>(10000, TimeSpan.FromMinutes(1), TimeSpan.FromHours(24), () => DateTime.UtcNow);

            _index = cache.AddIndex("exchangeName", x => x.ExchangeName);
        }
示例#7
0
        public HttpHost(HttpHostSettings hostSettings, IHostTopology topology)
        {
            _settings = hostSettings;
            Topology  = topology;

            //exception Filter
            ReceiveEndpoints = new ReceiveEndpointCollection();

            //connection retry policy

            _supervisor = new TaskSupervisor($"{TypeMetadataCache<HttpHost>.ShortName} - {Settings.Host}");

            _owinHostCache = new OwinHostCache(Settings, _supervisor);
        }
示例#8
0
        public InMemoryHost(IInMemoryHostConfiguration hostConfiguration, int concurrencyLimit, IHostTopology topology, Uri baseAddress = null)
        {
            _hostConfiguration = hostConfiguration;
            Topology           = topology;
            Address            = baseAddress ?? new Uri("loopback://localhost/");

            _messageFabric = new MessageFabric(concurrencyLimit);

            _receiveEndpoints = new ReceiveEndpointCollection();
            Add(_receiveEndpoints);

            var cacheSettings = new CacheSettings(10000, TimeSpan.FromMinutes(1), TimeSpan.FromHours(24));

            var cache = new GreenCache <InMemorySendTransport>(cacheSettings);

            _index = cache.AddIndex("exchangeName", x => x.ExchangeName);
        }
示例#9
0
        public InMemoryHostConfiguration(IInMemoryBusConfiguration busConfiguration, Uri baseAddress, int transportConcurrencyLimit, IHostTopology hostTopology)
        {
            _busConfiguration = busConfiguration;

            _host = new InMemoryHost(this, transportConcurrencyLimit, hostTopology, baseAddress);
        }
示例#10
0
 public static string CreateTemporaryResponseQueueName(this IHostTopology topology)
 {
     return(topology.CreateTemporaryQueueName("response-"));
 }