aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2010-09-08 14:13:01 -0700
committerDiva Canto2010-09-08 14:13:01 -0700
commitae6682036df0268b47a27756915c72367663efec (patch)
treef62785023290b331ea5efa40adcc7a3563a14684 /OpenSim
parentRenamed the Helo server connector to a consistent name. Added this in connect... (diff)
downloadopensim-SC_OLD-ae6682036df0268b47a27756915c72367663efec.zip
opensim-SC_OLD-ae6682036df0268b47a27756915c72367663efec.tar.gz
opensim-SC_OLD-ae6682036df0268b47a27756915c72367663efec.tar.bz2
opensim-SC_OLD-ae6682036df0268b47a27756915c72367663efec.tar.xz
Made the HG asset and inventory brokers use the Helo service in order to instantiate the right network connectors. Tested on Robust only.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs15
-rw-r--r--OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs23
2 files changed, 24 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
index 5b4fecb..39410b5 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs
@@ -37,6 +37,7 @@ using OpenSim.Region.Framework.Interfaces;
37using OpenSim.Region.Framework.Scenes; 37using OpenSim.Region.Framework.Scenes;
38using OpenSim.Services.Interfaces; 38using OpenSim.Services.Interfaces;
39using OpenSim.Services.Connectors; 39using OpenSim.Services.Connectors;
40using OpenSim.Services.Connectors.SimianGrid;
40using OpenMetaverse; 41using OpenMetaverse;
41 42
42namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory 43namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
@@ -538,12 +539,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
538 } 539 }
539 else 540 else
540 { 541 {
541 // We're instantiating this class explicitly, but this won't 542 // Still not as flexible as I would like this to be,
542 // work in general, because the remote grid may be running 543 // but good enough for now
543 // an inventory server that has a different protocol. 544 string connectorType = new HeloServicesConnector(url).Helo();
544 // Eventually we will want a piece of protocol asking 545 m_log.DebugFormat("[HG INVENTORY SERVICE]: HELO returned {0}", connectorType);
545 // the remote server about its kind. Definitely cool thing to do! 546 if (connectorType == "opensim-simian")
546 connector = new RemoteXInventoryServicesConnector(url); 547 connector = new SimianInventoryServiceConnector(url);
548 else
549 connector = new RemoteXInventoryServicesConnector(url);
547 m_connectors.Add(url, connector); 550 m_connectors.Add(url, connector);
548 } 551 }
549 } 552 }
diff --git a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
index 34df54a..5c31639 100644
--- a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
@@ -32,6 +32,8 @@ using System.Collections.Generic;
32using System.Reflection; 32using System.Reflection;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Services.Interfaces; 34using OpenSim.Services.Interfaces;
35using OpenSim.Services.Connectors.Hypergrid;
36using OpenSim.Services.Connectors.SimianGrid;
35 37
36namespace OpenSim.Services.Connectors 38namespace OpenSim.Services.Connectors
37{ 39{
@@ -41,7 +43,7 @@ namespace OpenSim.Services.Connectors
41 LogManager.GetLogger( 43 LogManager.GetLogger(
42 MethodBase.GetCurrentMethod().DeclaringType); 44 MethodBase.GetCurrentMethod().DeclaringType);
43 45
44 private Dictionary<string, AssetServicesConnector> m_connectors = new Dictionary<string, AssetServicesConnector>(); 46 private Dictionary<string, IAssetService> m_connectors = new Dictionary<string, IAssetService>();
45 47
46 public HGAssetServiceConnector(IConfigSource source) 48 public HGAssetServiceConnector(IConfigSource source)
47 { 49 {
@@ -81,7 +83,7 @@ namespace OpenSim.Services.Connectors
81 83
82 private IAssetService GetConnector(string url) 84 private IAssetService GetConnector(string url)
83 { 85 {
84 AssetServicesConnector connector = null; 86 IAssetService connector = null;
85 lock (m_connectors) 87 lock (m_connectors)
86 { 88 {
87 if (m_connectors.ContainsKey(url)) 89 if (m_connectors.ContainsKey(url))
@@ -90,12 +92,17 @@ namespace OpenSim.Services.Connectors
90 } 92 }
91 else 93 else
92 { 94 {
93 // We're instantiating this class explicitly, but this won't 95 // Still not as flexible as I would like this to be,
94 // work in general, because the remote grid may be running 96 // but good enough for now
95 // an asset server that has a different protocol. 97 string connectorType = new HeloServicesConnector(url).Helo();
96 // Eventually we will want a piece of protocol asking 98 m_log.DebugFormat("[HG ASSET SERVICE]: HELO returned {0}", connectorType);
97 // the remote server about its kind. Definitely cool thing to do! 99 if (connectorType == "opensim-simian")
98 connector = new AssetServicesConnector(url); 100 {
101 connector = new SimianAssetServiceConnector(url);
102 }
103 else
104 connector = new AssetServicesConnector(url);
105
99 m_connectors.Add(url, connector); 106 m_connectors.Add(url, connector);
100 } 107 }
101 } 108 }