public void SetConfig(IConfigSource config, GridRegistrationService gridRegService) { m_configurationConfig = config.Configs["Configuration"]; if (m_configurationConfig != null) { m_defaultHostname = MainServer.Instance.FullHostName; m_remotePassword = m_configurationConfig.GetString("RemotePassword", ""); m_remotePort = m_configurationConfig.GetUInt("RemoteLoadBalancingPort", m_defaultPort); SetRemoteUrls(m_configurationConfig.GetString("RemoteLoadBalancingUrls", "").Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries)); if (m_configurationConfig.GetBoolean("UseRemoteLoadBalancing", false)) { //Set up the external handlers IHttpServer server = gridRegService.m_registry.RequestModuleInterface <ISimulationBase> ().GetHttpServer(m_remotePort); RemoteLoadBalancingPostHandler handler = new RemoteLoadBalancingPostHandler("/LoadBalancing", m_remotePassword, gridRegService); server.AddStreamHandler(handler); } } }
public RemoteLoadBalancingPostHandler (string url, string password, GridRegistrationService gridReg) : base ("POST", url) { m_password = password; m_service = gridReg; }
public void SetConfig (IConfigSource config, GridRegistrationService gridRegService) { m_configurationConfig = config.Configs["Configuration"]; if (m_configurationConfig != null) { m_defaultHostname = MainServer.Instance.FullHostName; m_remotePassword = m_configurationConfig.GetString ("RemotePassword", ""); m_remotePort = m_configurationConfig.GetUInt ("RemoteLoadBalancingPort", m_defaultPort); SetRemoteUrls (m_configurationConfig.GetString ("RemoteLoadBalancingUrls", "").Split (new[] { "," }, StringSplitOptions.RemoveEmptyEntries)); if (m_configurationConfig.GetBoolean("UseRemoteLoadBalancing", false)) { //Set up the external handlers IHttpServer server = gridRegService.m_registry.RequestModuleInterface<ISimulationBase> ().GetHttpServer (m_remotePort); RemoteLoadBalancingPostHandler handler = new RemoteLoadBalancingPostHandler ("/LoadBalancing", m_remotePassword, gridRegService); server.AddStreamHandler (handler); } } }
public RemoteLoadBalancingPostHandler(string url, string password, GridRegistrationService gridReg) : base("POST", url) { m_password = password; m_service = gridReg; }