Exemplo n.º 1
0
        private bool InitialiseService(IConfigSource source, RegionInfoCache ric)
        {
            if(ric == null && m_RegionInfoCache == null)
                m_RegionInfoCache = new RegionInfoCache();
            else
                m_RegionInfoCache = ric;

            IConfig config = source.Configs["GridService"];
            if (config == null)
            {
                m_log.Error("[LOCAL GRID SERVICE CONNECTOR]: GridService missing from OpenSim.ini");
                return false;
            }

            string serviceDll = config.GetString("LocalServiceModule", String.Empty);

            if (serviceDll == String.Empty)
            {
                m_log.Error("[LOCAL GRID SERVICE CONNECTOR]: No LocalServiceModule named in section GridService");
                return false;
            }

            Object[] args = new Object[] { source };
            m_GridService = ServerUtils.LoadPlugin<IGridService>(serviceDll, args);

            if (m_GridService == null)
            {
                m_log.Error("[LOCAL GRID SERVICE CONNECTOR]: Can't load grid service");
                return false;
            }

            m_Enabled = true;
            return true;
        }
Exemplo n.º 2
0
        private bool InitialiseServices(IConfigSource source)
        {
            IConfig gridConfig = source.Configs["GridService"];

            if (gridConfig == null)
            {
                m_log.Error("[REMOTE GRID CONNECTOR]: GridService missing from OpenSim.ini");
                return(false);
            }

            string networkConnector = gridConfig.GetString("NetworkConnector", string.Empty);

            if (networkConnector == string.Empty)
            {
                m_log.Error("[REMOTE GRID CONNECTOR]: Please specify a network connector under [GridService]");
                return(false);
            }

            Object[] args = new Object[] { source };
            m_RemoteGridService = ServerUtils.LoadPlugin <IGridService>(networkConnector, args);

            m_LocalGridService = new LocalGridServicesConnector(source, m_RegionInfoCache);
            if (m_LocalGridService == null)
            {
                m_log.Error("[REMOTE GRID CONNECTOR]: failed to load local connector");
                return(false);
            }

            if (m_RegionInfoCache == null)
            {
                m_RegionInfoCache = new RegionInfoCache();
            }

            return(true);
        }
Exemplo n.º 3
0
        private bool InitialiseServices(IConfigSource source)
        {
            IConfig gridConfig = source.Configs["GridService"];

            if (gridConfig == null)
            {
                m_log.Error("[REMOTE GRID CONNECTOR]: GridService missing from OpenSim.ini");
                return(false);
            }

            string networkConnector = gridConfig.GetString("NetworkConnector", string.Empty);

            if (networkConnector == string.Empty)
            {
                m_log.Error("[REMOTE GRID CONNECTOR]: Please specify a network connector under [GridService]");
                return(false);
            }

            Object[] args = new Object[] { source };
            m_RemoteGridService = ServerUtils.LoadPlugin <IGridService>(networkConnector, args);

            m_LocalGridService = new LocalGridServicesConnector(source, m_RegionInfoCache);
            if (m_LocalGridService == null)
            {
                m_log.Error("[REMOTE GRID CONNECTOR]: failed to load local connector");
                return(false);
            }

            if (m_RegionInfoCache == null)
            {
                m_RegionInfoCache = new RegionInfoCache();
            }

            m_ThisGatekeeperURI = Util.GetConfigVarFromSections <string>(source, "GatekeeperURI",
                                                                         new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty);
            // Legacy. Remove soon!
            m_ThisGatekeeperURI = gridConfig.GetString("Gatekeeper", m_ThisGatekeeperURI);

            Util.checkServiceURI(m_ThisGatekeeperURI, out m_ThisGatekeeperURI, out m_ThisGatekeeperHost, out m_ThisGatekeeperIP);

            string gatekeeperURIAlias = Util.GetConfigVarFromSections <string>(source, "GatekeeperURIAlias",
                                                                               new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty);

            if (!string.IsNullOrWhiteSpace(gatekeeperURIAlias))
            {
                string[] alias = gatekeeperURIAlias.Split(',');
                for (int i = 0; i < alias.Length; ++i)
                {
                    if (!string.IsNullOrWhiteSpace(alias[i]))
                    {
                        m_ThisGateKeeperAlias.Add(alias[i].ToLower());
                    }
                }
            }
            return(true);
        }
        private bool InitialiseServices(IConfigSource source)
        {
            IConfig gridConfig = source.Configs["GridService"];

            if (gridConfig == null)
            {
                m_log.Error("[REGION GRID CONNECTOR]: GridService missing from OpenSim.ini");
                return(false);
            }

            string serviceDll = gridConfig.GetString("LocalServiceModule", string.Empty);

            if (string.IsNullOrWhiteSpace(serviceDll))
            {
                m_log.Error("[REGION GRID CONNECTOR]: No LocalServiceModule named in section GridService");
                return(false);
            }

            object[] args = new object[] { source };
            m_LocalGridService = ServerUtils.LoadPlugin <IGridService>(serviceDll, args);

            if (m_LocalGridService == null)
            {
                m_log.Error("[REGION GRID CONNECTOR]: failed to load LocalServiceModule");
                return(false);
            }

            string networkConnector = gridConfig.GetString("NetworkConnector", string.Empty);

            if (!string.IsNullOrWhiteSpace(networkConnector))
            {
                m_RemoteGridService = ServerUtils.LoadPlugin <IGridService>(networkConnector, args);
                if (m_RemoteGridService == null)
                {
                    m_log.Error("[REGION GRID CONNECTOR]: failed to load NetworkConnector");
                    return(false);
                }
            }

            m_RegionInfoCache = new RegionInfoCache();
            return(true);
        }
        private bool InitialiseServices(IConfigSource source)
        {
            IConfig gridConfig = source.Configs["GridService"];

            if (gridConfig == null)
            {
                m_log.Error("[REMOTE GRID CONNECTOR]: GridService missing from OpenSim.ini");
                return(false);
            }

            string networkConnector = gridConfig.GetString("NetworkConnector", string.Empty);

            if (networkConnector == string.Empty)
            {
                m_log.Error("[REMOTE GRID CONNECTOR]: Please specify a network connector under [GridService]");
                return(false);
            }

            Object[] args = new Object[] { source };
            m_RemoteGridService = ServerUtils.LoadPlugin <IGridService>(networkConnector, args);

            m_LocalGridService = new LocalGridServicesConnector(source, m_RegionInfoCache);
            if (m_LocalGridService == null)
            {
                m_log.Error("[REMOTE GRID CONNECTOR]: failed to load local connector");
                return(false);
            }

            if (m_RegionInfoCache == null)
            {
                m_RegionInfoCache = new RegionInfoCache();
            }

            m_ThisGatekeeper = Util.GetConfigVarFromSections <string>(source, "GatekeeperURI",
                                                                      new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty);
            // Legacy. Remove soon!
            m_ThisGatekeeper = gridConfig.GetString("Gatekeeper", m_ThisGatekeeper);

            Util.checkServiceURI(m_ThisGatekeeper, out m_ThisGatekeeper);

            return(true);
        }
Exemplo n.º 6
0
 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache)
 {
     m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly with cache.", LogHeader);
     InitialiseService(source, regionInfoCache);
 }
        private bool InitialiseService(IConfigSource source, RegionInfoCache ric)
        {
            if(ric == null)
                m_RegionInfoCache = new RegionInfoCache();
            else
                m_RegionInfoCache = ric;

            IConfig config = source.Configs["GridService"];
            if (config == null)
            {
                m_log.Error("[LOCAL GRID SERVICE CONNECTOR]: GridService missing from OpenSim.ini");
                return false;
            }

            string serviceDll = config.GetString("LocalServiceModule", String.Empty);

            if (serviceDll == String.Empty)
            {
                m_log.Error("[LOCAL GRID SERVICE CONNECTOR]: No LocalServiceModule named in section GridService");
                return false;
            }

            Object[] args = new Object[] { source };
            m_GridService =
                    ServerUtils.LoadPlugin<IGridService>(serviceDll,
                    args);

            if (m_GridService == null)
            {
                m_log.Error("[LOCAL GRID SERVICE CONNECTOR]: Can't load grid service");
                return false;
            }

            m_Enabled = true;
            return true;
        }
 public LocalGridServicesConnector(IConfigSource source, RegionInfoCache regionInfoCache)
 {
     m_log.DebugFormat("{0} LocalGridServicesConnector instantiated directly.", LogHeader);
     InitialiseService(source, regionInfoCache);
 }