コード例 #1
0
 public ApiMessageProcessor(RuntimeConfiguration runtimeConfiguration, WorkerRegistrationPool workerRegistrationPool, JobDispatchManager jobDispatchManager)
 {
     sharedLogger            = runtimeConfiguration.GetLoggerInstance();
     apiServer               = new TCPServer(runtimeConfiguration.GetManagerBindAddress(), runtimeConfiguration.GetManagerExecPort());
     workerPool              = workerRegistrationPool;
     this.jobDispatchManager = jobDispatchManager;
     reportProcessor         = new ReportProcessor(workerRegistrationPool, jobDispatchManager);
     activeClients           = new List <TCPClient>();
     commandProcessor        = new CommandProcessor(jobDispatchManager);
 }
コード例 #2
0
        /// <summary>
        ///Initializes the manager with specified settings.
        /// </summary>
        /// <param name="runtimeConfiguration">Active runtime configuration settings for this session.</param>
        /// <param name="workerRegistrationPool">Configured pool of workers to manage.</param>
        /// <exception cref="ArgumentException">When invalid IP/port bindings are configured.</exception>
        public WorkerRegistrationManager(RuntimeConfiguration runtimeConfiguration, WorkerRegistrationPool workerRegistrationPool)
        {
            managerBindIP = runtimeConfiguration.GetManagerBindAddress();
            try
            {
                tcpServer = new TCPServer(managerBindIP, runtimeConfiguration.GetManagerComPort());
            }
            catch (ArgumentException e)
            {
                throw new ArgumentException("Invalid IP or port setting for the Worker Registration Manager. Check settings and try again.", e);
            }
            catch (IOException e)
            {
                throw new IOException("The Worker Registration Service encountered an error while binding to the configured IP/port configuration. Ensure that you have the correct permissions to use the port and that the requested port is not already in use by another process.", e);
            }

            shouldListen              = false;
            registrationPool          = workerRegistrationPool;
            sharedLogger              = runtimeConfiguration.GetLoggerInstance();
            this.runtimeConfiguration = runtimeConfiguration;
        }
コード例 #3
0
 /// <summary>
 /// Default constructor with default settings.
 /// </summary>
 /// <param name="runtimeConfiguration">Active runtime configuration settings for current session.</param>
 /// <param name="workerRegistrationPool">Active pool of workers to pull information from.</param>
 public WorkerMessageProcessor(RuntimeConfiguration runtimeConfiguration, WorkerRegistrationPool workerRegistrationPool, DataStoreManager dataStoreManager)
 {
     sharedLogger = runtimeConfiguration.GetLoggerInstance();
     this.workerRegistrationPool = workerRegistrationPool;
     this.dataStoreManager       = dataStoreManager;
 }