Exemplo n.º 1
0
        public virtual void InitializeClient(ClientConfig clientConfig)
        {
            _mClientConfig = clientConfig ?? new ClientConfig();

            _mHostName = NetworkInterfaceManager.GetLocalHostName();

            _mStatistics = new DefaultMessageStatistics();
            _mSender = new TcpMessageSender(_mClientConfig, _mStatistics);
            _mSender.Initialize();
            _mFactory = new MessageIdFactory();
            _mStatusUpdateTask = new StatusUpdateTask(_mStatistics);

            // initialize domain and ip address
            _mFactory.Initialize(_mClientConfig.Domain.Id);

            // start status update task
            ThreadPool.QueueUserWorkItem(_mStatusUpdateTask.Run);

            Logger.Info("Thread(StatusUpdateTask) started.");
        }
Exemplo n.º 2
0
        public virtual void InitializeClient(ClientConfig clientConfig)
        {
            _mClientConfig = clientConfig ?? new ClientConfig();

            _mHostName = NetworkInterfaceManager.GetLocalHostName();

            _mStatistics = new DefaultMessageStatistics();
            _mSender = new TcpMessageSender(_mClientConfig, _mStatistics);
            _mSender.Initialize();
            _mFactory = new MessageIdFactory();
            _mStatusUpdateTask = new StatusUpdateTask(_mStatistics);

            // initialize domain and ip address
            _mFactory.Initialize(_mClientConfig.Domain.Id);

            // start status update task
            ThreadPool.QueueUserWorkItem(_mStatusUpdateTask.Run);

            Logger.Info("Thread(StatusUpdateTask) started.");
        }