Esempio n. 1
0
        public virtual void InitializeClient(ClientConfig clientConfig)
        {
            _clientConfig = clientConfig ?? new ClientConfig();

            _hostName   = NetworkInterfaceManager.GetLocalHostName();
            _statistics = new DefaultMessageStatistics();
            _sender     = new TcpMessageSender(_clientConfig, _statistics);
            _sender.Initialize();
            _factory          = new MessageIdFactory();
            _statusUpdateTask = new StatusUpdateTask(_statistics);

            _taggedTransactions = new ConcurrentDictionary <string, ITaggedTransaction>();

            // initialize domain and ip address
            _factory.Initialize(_clientConfig.Domain.Id);

            // start status update task
            ThreadPool.QueueUserWorkItem(_statusUpdateTask.Run);
            Logger.Info("Thread(StatusUpdateTask) started.");
        }
        public virtual void InitializeClient(ClientConfig clientConfig)
        {
            _clientConfig = clientConfig ?? new ClientConfig();

            _hostName = NetworkInterfaceManager.GetLocalHostName();
            _statistics = new DefaultMessageStatistics();
            _sender = new TcpMessageSender(_clientConfig, _statistics);
            _sender.Initialize();
            _factory = new MessageIdFactory();
            _statusUpdateTask = new StatusUpdateTask(_statistics);

            _taggedTransactions = new ConcurrentDictionary<string, ITaggedTransaction>();

            // initialize domain and ip address
            _factory.Initialize(_clientConfig.Domain.Id);

            // start status update task
            ThreadPool.QueueUserWorkItem(_statusUpdateTask.Run);
            Logger.Info("Thread(StatusUpdateTask) started.");
        }