Inheritance: ISharedRegionModule, IInventoryService
 public void Initialise(IConfigSource source)
 {
     IConfig moduleConfig = source.Configs["Modules"];
     if (moduleConfig != null)
     {
         string name = moduleConfig.GetString("InventoryServices", "");
         if (name == Name)
         {
             IConfig multipleConfig = source.Configs["MultipleGridsModule"];
             if (multipleConfig != null)
             {
                 IConfig UAS = source.Configs["InventoryService"];
                 if (UAS != null)
                 {
                     string[] Grids = multipleConfig.GetString("InventoryServerURIs", "").Split(',');
                     //Set it so that it works for them
                     moduleConfig.Set("InventoryServices", "RemoteXInventoryServicesConnector");
                     foreach (string gridURL in Grids)
                     {
                         //Set their gridURL
                         UAS.Set("InventoryServerURI", gridURL);
                         //Start it up
                         RemoteXInventoryServicesConnector connector = new RemoteXInventoryServicesConnector();
                         connector.Initialise(source);
                         AllServices.Add(connector);
                         m_log.Info("[INVENTORY CONNECTOR]: Multiple inventory services enabled for " + gridURL);
                     }
                 }
             }
             //Reset the name
             moduleConfig.Set("InventoryServices", Name);
             m_Enabled = true;
         }
     }
 }
Exemplo n.º 2
0
        private IInventoryService GetConnector(string url)
        {
            IInventoryService connector = null;

            lock (m_connectors)
            {
                if (m_connectors.ContainsKey(url))
                {
                    connector = m_connectors[url];
                }
                else
                {
                    // Still not as flexible as I would like this to be,
                    // but good enough for now
                    string connectorType = new HeloServicesConnector(url).Helo();
                    m_log.DebugFormat("[HG INVENTORY SERVICE]: HELO returned {0}", connectorType);
                    if (connectorType == "opensim-simian")
                    {
                        connector = new SimianInventoryServiceConnector(url);
                    }
                    else
                    {
                        RemoteXInventoryServicesConnector rxisc = new RemoteXInventoryServicesConnector(url);
                        rxisc.Scene = m_Scenes[0];
                        connector   = rxisc;
                    }

                    m_connectors.Add(url, connector);
                }
            }

            return(connector);
        }
 private IInventoryService GetConnector(string url)
 {
     return(m_connectors.GetOrAddIfNotExists(url, delegate()
     {
         // Still not as flexible as I would like this to be,
         // but good enough for now
         string connectorType = new HeloServicesConnector(url).Helo();
         m_log.DebugFormat("[HG INVENTORY SERVICE]: HELO returned {0}", connectorType);
         if (connectorType == "opensim-simian")
         {
             return new SimianInventoryServiceConnector(url);
         }
         else
         {
             RemoteXInventoryServicesConnector rxisc = new RemoteXInventoryServicesConnector(url);
             rxisc.Scene = m_Scenes[0];
             return rxisc;
         }
     }));
 }
Exemplo n.º 4
0
        private IInventoryService GetConnector(string url)
        {
            IInventoryService connector = null;

            lock (m_connectors)
            {
                if (!m_connectors.TryGetValue(url, out connector))
                {
                    // Still not as flexible as I would like this to be,
                    // but good enough for now
                    RemoteXInventoryServicesConnector rxisc = new RemoteXInventoryServicesConnector(url);
                    rxisc.Scene = m_Scenes[0];
                    connector   = rxisc;
                }
                if (connector != null)
                {
                    m_connectors.AddOrUpdate(url, connector, CONNECTORS_CACHE_EXPIRE);
                }
            }
            return(connector);
        }
Exemplo n.º 5
0
        private IInventoryService GetConnector(string url)
        {
            IInventoryService connector = null;

            lock (m_connectors)
            {
                if (m_connectors.ContainsKey(url))
                {
                    connector = m_connectors[url];
                }
                else
                {
                    // We're instantiating this class explicitly, but this won't
                    // work in general, because the remote grid may be running
                    // an inventory server that has a different protocol.
                    // Eventually we will want a piece of protocol asking
                    // the remote server about its kind. Definitely cool thing to do!
                    connector = new RemoteXInventoryServicesConnector(url);
                    m_connectors.Add(url, connector);
                }
            }
            return(connector);
        }
Exemplo n.º 6
0
        private IInventoryService GetConnector(string url)
        {
            IInventoryService connector = null;

            lock (m_connectors)
            {
                if (m_connectors.ContainsKey(url))
                {
                    connector = m_connectors[url];
                }
                else
                {
                    // Still not as flexible as I would like this to be,
                    // but good enough for now
                    RemoteXInventoryServicesConnector rxisc = new RemoteXInventoryServicesConnector(url);
                    rxisc.Scene = m_Scenes[0];
                    connector   = rxisc;

                    m_connectors.Add(url, connector);
                }
            }

            return(connector);
        }
Exemplo n.º 7
0
        private IInventoryService GetConnector(string url)
        {
            IInventoryService connector = null;
            lock (m_connectors)
            {
                if (m_connectors.ContainsKey(url))
                {
                    connector = m_connectors[url];
                }
                else
                {
                    // Still not as flexible as I would like this to be,
                    // but good enough for now
                    string connectorType = new HeloServicesConnector(url).Helo();
                    m_log.DebugFormat("[HG INVENTORY SERVICE]: HELO returned {0}", connectorType);
                    if (connectorType == "opensim-simian")
                    {
                        connector = new SimianInventoryServiceConnector(url);
                    }
                    else
                    {
                        RemoteXInventoryServicesConnector rxisc = new RemoteXInventoryServicesConnector(url);
                        rxisc.Scene = m_Scenes[0];
                        connector = rxisc;
                    }

                    m_connectors.Add(url, connector);
                }
            }

            return connector;
        }
Exemplo n.º 8
0
 private IInventoryService GetConnector(string url)
 {
     IInventoryService connector = null;
     lock (m_connectors)
     {
         if (m_connectors.ContainsKey(url))
         {
             connector = m_connectors[url];
         }
         else
         {
             // We're instantiating this class explicitly, but this won't
             // work in general, because the remote grid may be running
             // an inventory server that has a different protocol.
             // Eventually we will want a piece of protocol asking
             // the remote server about its kind. Definitely cool thing to do!
             connector = new RemoteXInventoryServicesConnector(url);
             m_connectors.Add(url, connector);
         }
     }
     return connector;
 }
Exemplo n.º 9
0
 private IInventoryService GetConnector(string url)
 {
     return m_connectors.GetOrAddIfNotExists(url, delegate()
     {
         // Still not as flexible as I would like this to be,
         // but good enough for now
         string connectorType = new HeloServicesConnector(url).Helo();
         m_log.DebugFormat("[HG INVENTORY SERVICE]: HELO returned {0}", connectorType);
         if (connectorType == "opensim-simian")
         {
             return new SimianInventoryServiceConnector(url);
         }
         else
         {
             RemoteXInventoryServicesConnector rxisc = new RemoteXInventoryServicesConnector(url);
             rxisc.Scene = m_Scenes[0];
             return rxisc;
         }
     });
 }