diff options
7 files changed, 39 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs index 235914a..2f96bcb 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs | |||
@@ -115,6 +115,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid | |||
115 | m_HypergridHandler = new GatekeeperServiceInConnector(m_Config, MainServer.Instance, simService); | 115 | m_HypergridHandler = new GatekeeperServiceInConnector(m_Config, MainServer.Instance, simService); |
116 | 116 | ||
117 | new UserAgentServerConnector(m_Config, MainServer.Instance); | 117 | new UserAgentServerConnector(m_Config, MainServer.Instance); |
118 | new HeloServiceInConnector(m_Config, MainServer.Instance, "HeloService"); | ||
118 | } | 119 | } |
119 | scene.RegisterModuleInterface<IGatekeeperService>(m_HypergridHandler.GateKeeper); | 120 | scene.RegisterModuleInterface<IGatekeeperService>(m_HypergridHandler.GateKeeper); |
120 | } | 121 | } |
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; | |||
37 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
38 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
39 | using OpenSim.Services.Connectors; | 39 | using OpenSim.Services.Connectors; |
40 | using OpenSim.Services.Connectors.SimianGrid; | ||
40 | using OpenMetaverse; | 41 | using OpenMetaverse; |
41 | 42 | ||
42 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | 43 | namespace 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/Server/Handlers/Hypergrid/HeloServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs index 6c83aff..39baa32 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs | |||
@@ -39,9 +39,9 @@ using OpenSim.Server.Handlers.Base; | |||
39 | 39 | ||
40 | namespace OpenSim.Server.Handlers.Hypergrid | 40 | namespace OpenSim.Server.Handlers.Hypergrid |
41 | { | 41 | { |
42 | public class HeloServiceConnector : ServiceConnector | 42 | public class HeloServiceInConnector : ServiceConnector |
43 | { | 43 | { |
44 | public HeloServiceConnector(IConfigSource config, IHttpServer server, string configName) : | 44 | public HeloServiceInConnector(IConfigSource config, IHttpServer server, string configName) : |
45 | base(config, server, configName) | 45 | base(config, server, configName) |
46 | { | 46 | { |
47 | server.AddStreamHandler(new HeloServerGetHandler("opensim-robust")); | 47 | server.AddStreamHandler(new HeloServerGetHandler("opensim-robust")); |
@@ -68,6 +68,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
68 | 68 | ||
69 | private byte[] OKResponse(OSHttpResponse httpResponse) | 69 | private byte[] OKResponse(OSHttpResponse httpResponse) |
70 | { | 70 | { |
71 | m_log.Debug("[HELO]: hi, I was called"); | ||
71 | httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType); | 72 | httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType); |
72 | httpResponse.StatusCode = (int)HttpStatusCode.OK; | 73 | httpResponse.StatusCode = (int)HttpStatusCode.OK; |
73 | httpResponse.StatusDescription = "OK"; | 74 | httpResponse.StatusDescription = "OK"; |
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; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Services.Interfaces; | 34 | using OpenSim.Services.Interfaces; |
35 | using OpenSim.Services.Connectors.Hypergrid; | ||
36 | using OpenSim.Services.Connectors.SimianGrid; | ||
35 | 37 | ||
36 | namespace OpenSim.Services.Connectors | 38 | namespace 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 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 8f601e8..30d3147 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |||
@@ -84,6 +84,11 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
84 | CommonInit(source); | 84 | CommonInit(source); |
85 | } | 85 | } |
86 | 86 | ||
87 | public SimianAssetServiceConnector(string url) | ||
88 | { | ||
89 | m_serverUrl = url; | ||
90 | } | ||
91 | |||
87 | public void Initialise(IConfigSource source) | 92 | public void Initialise(IConfigSource source) |
88 | { | 93 | { |
89 | IConfig moduleConfig = source.Configs["Modules"]; | 94 | IConfig moduleConfig = source.Configs["Modules"]; |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 470eccd..3953369 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -91,6 +91,11 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
91 | CommonInit(source); | 91 | CommonInit(source); |
92 | } | 92 | } |
93 | 93 | ||
94 | public SimianInventoryServiceConnector(string url) | ||
95 | { | ||
96 | m_serverUrl = url; | ||
97 | } | ||
98 | |||
94 | public void Initialise(IConfigSource source) | 99 | public void Initialise(IConfigSource source) |
95 | { | 100 | { |
96 | IConfig moduleConfig = source.Configs["Modules"]; | 101 | IConfig moduleConfig = source.Configs["Modules"]; |
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index dae7a19..deceb86 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example | |||
@@ -21,7 +21,7 @@ | |||
21 | ; * [[<ConfigName>@]<port>/]<dll name>[:<class name>] | 21 | ; * [[<ConfigName>@]<port>/]<dll name>[:<class name>] |
22 | ; * | 22 | ; * |
23 | [Startup] | 23 | [Startup] |
24 | ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:AssetServiceConnector" | 24 | ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:AssetServiceConnector,8002/OpenSim.Server.Handlers.dll:HeloServiceInConnector" |
25 | 25 | ||
26 | ; * This is common for all services, it's the network setup for the entire | 26 | ; * This is common for all services, it's the network setup for the entire |
27 | ; * server instance, if none if specified above | 27 | ; * server instance, if none if specified above |