Exemple #1
0
 public NameServerController(NameServerSetting setting = null)
 {
     Setting               = setting ?? new NameServerSetting();
     ClusterManager        = new ClusterManager(this);
     _logger               = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName);
     _socketRemotingServer = new SocketRemotingServer("EQueue.NameServer.RemotingServer", Setting.BindingAddress, Setting.SocketSetting);
     RegisterRequestHandlers();
 }
 public NameServerController(NameServerSetting setting = null)
 {
     Setting = setting ?? new NameServerSetting();
     ClusterManager = new ClusterManager(this);
     _logger = ObjectContainer.Resolve<ILoggerFactory>().Create(GetType().FullName);
     _socketRemotingServer = new SocketRemotingServer("EQueue.NameServer.RemotingServer", Setting.BindingAddress, Setting.SocketSetting);
     _service = new ConsoleEventHandlerService();
     _service.RegisterClosingEventHandler(eventCode => { Shutdown(); });
     _socketRemotingServer.RegisterConnectionEventListener(new BrokerConnectionEventListener(this));
     RegisterRequestHandlers();
 }
 public NameServerController(NameServerSetting setting = null)
 {
     Setting               = setting ?? new NameServerSetting();
     ClusterManager        = new ClusterManager(this);
     _logger               = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName);
     _socketRemotingServer = new SocketRemotingServer("EQueue.NameServer.RemotingServer", Setting.BindingAddress, Setting.SocketSetting);
     _service              = new ConsoleEventHandlerService();
     _service.RegisterClosingEventHandler(eventCode => { Shutdown(); });
     _socketRemotingServer.RegisterConnectionEventListener(new BrokerConnectionEventListener(this));
     RegisterRequestHandlers();
 }
 public NameServerController(NameServerSetting setting = null)
 {
     Setting               = setting ?? new NameServerSetting();
     ClusterManager        = new ClusterManager(this);
     _logger               = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName);
     _socketRemotingServer = new SocketRemotingServer("EQueue.NameServer.RemotingServer", Setting.BindingAddress, Setting.SocketSetting);
     RegisterRequestHandlers();
     TaskScheduler.UnobservedTaskException += (sender, ex) =>
     {
         _logger.ErrorFormat("UnobservedTaskException occurred.", ex);
     };
 }