Exemplo n.º 1
0
        public bool Start(XDocument config, string groupName, string processId, out string processUri, out string fileUri)
        {
            int    portNumber;
            string httpPrefix;

            processUri = null;
            fileUri    = null;

            if (!Initialize(config, out portNumber, out httpPrefix, out environment))
            {
                finished.Set();
                return(false);
            }

            httpPrefix = httpPrefix + groupName + "/" + processId + "/";

            server = new HttpServer(portNumber, httpPrefix, logger);

            if (!server.Start())
            {
                logger.Log("Failed to start process http server");
                finished.Set();
                return(false);
            }

            processServer = new ProcessServer("process/", server, this);
            fileServer    = new FileServer("file/", server, this);

            processUri = processServer.BaseURI;
            fileUri    = fileServer.BaseURI;

            return(true);
        }
Exemplo n.º 2
0
        public bool Start(XDocument config, string groupName, string processId, out string processUri, out string fileUri)
        {
            int portNumber;
            string httpPrefix;

            processUri = null;
            fileUri = null;

            if (!Initialize(config, out portNumber, out httpPrefix, out environment))
            {
                finished.Set();
                return false;
            }

            httpPrefix = httpPrefix + groupName + "/" + processId + "/";

            server = new HttpServer(portNumber, httpPrefix, logger);

            if (!server.Start())
            {
                logger.Log("Failed to start process http server");
                finished.Set();
                return false;
            }

            processServer = new ProcessServer("process/", server, this);
            fileServer = new FileServer("file/", server, this);

            processUri = processServer.BaseURI;
            fileUri = fileServer.BaseURI;

            return true;
        }