aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/GridServer
diff options
context:
space:
mode:
authorMW2009-02-23 19:38:36 +0000
committerMW2009-02-23 19:38:36 +0000
commit03ff84426f2cfeb799c39fa00c74377712ea4c58 (patch)
tree4964d0a0730f9721b2e902643617e959c4d74735 /OpenSim/Grid/GridServer
parentFrom: Christopher Yeoh <yeohc@au1.ibm.com> (diff)
downloadopensim-SC-03ff84426f2cfeb799c39fa00c74377712ea4c58.zip
opensim-SC-03ff84426f2cfeb799c39fa00c74377712ea4c58.tar.gz
opensim-SC-03ff84426f2cfeb799c39fa00c74377712ea4c58.tar.bz2
opensim-SC-03ff84426f2cfeb799c39fa00c74377712ea4c58.tar.xz
more refactoring of the Grid server, to separate them into modules
Diffstat (limited to 'OpenSim/Grid/GridServer')
-rw-r--r--OpenSim/Grid/GridServer/GridMessagingModule.cs4
-rw-r--r--OpenSim/Grid/GridServer/GridXmlRpcModule.cs15
2 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Grid/GridServer/GridMessagingModule.cs b/OpenSim/Grid/GridServer/GridMessagingModule.cs
index 2a26f24..16623e7 100644
--- a/OpenSim/Grid/GridServer/GridMessagingModule.cs
+++ b/OpenSim/Grid/GridServer/GridMessagingModule.cs
@@ -71,6 +71,9 @@ namespace OpenSim.Grid.GridServer
71 m_gridDBService = gridDBService; 71 m_gridDBService = gridDBService;
72 m_gridCore = gridCore; 72 m_gridCore = gridCore;
73 m_config = config; 73 m_config = config;
74
75 m_gridCore.RegisterInterface<IGridMessagingModule>(this);
76
74 RegisterHandlers(); 77 RegisterHandlers();
75 } 78 }
76 79
@@ -84,7 +87,6 @@ namespace OpenSim.Grid.GridServer
84 //have these in separate method as some servers restart the http server and reregister all the handlers. 87 //have these in separate method as some servers restart the http server and reregister all the handlers.
85 m_httpServer = m_gridCore.GetHttpServer(); 88 m_httpServer = m_gridCore.GetHttpServer();
86 89
87 m_gridCore.RegisterInterface<IGridMessagingModule>(this);
88 // Message Server ---> Grid Server 90 // Message Server ---> Grid Server
89 m_httpServer.AddXmlRPCHandler("register_messageserver", XmlRPCRegisterMessageServer); 91 m_httpServer.AddXmlRPCHandler("register_messageserver", XmlRPCRegisterMessageServer);
90 m_httpServer.AddXmlRPCHandler("deregister_messageserver", XmlRPCDeRegisterMessageServer); 92 m_httpServer.AddXmlRPCHandler("deregister_messageserver", XmlRPCDeRegisterMessageServer);
diff --git a/OpenSim/Grid/GridServer/GridXmlRpcModule.cs b/OpenSim/Grid/GridServer/GridXmlRpcModule.cs
index 8998b55..874b57f 100644
--- a/OpenSim/Grid/GridServer/GridXmlRpcModule.cs
+++ b/OpenSim/Grid/GridServer/GridXmlRpcModule.cs
@@ -50,6 +50,7 @@ namespace OpenSim.Grid.GridServer
50 50
51 protected GridConfig m_config; 51 protected GridConfig m_config;
52 52
53 protected IGridMessagingModule m_messagingServerMapper;
53 /// <value> 54 /// <value>
54 /// Used to notify old regions as to which OpenSim version to upgrade to 55 /// Used to notify old regions as to which OpenSim version to upgrade to
55 /// </value> 56 /// </value>
@@ -78,7 +79,11 @@ namespace OpenSim.Grid.GridServer
78 79
79 public void PostInitialise() 80 public void PostInitialise()
80 { 81 {
81 82 IGridMessagingModule messagingModule;
83 if (m_gridCore.TryGet<IGridMessagingModule>(out messagingModule))
84 {
85 m_messagingServerMapper = messagingModule;
86 }
82 } 87 }
83 88
84 public void RegisterHandlers() 89 public void RegisterHandlers()
@@ -391,10 +396,12 @@ namespace OpenSim.Grid.GridServer
391 396
392 responseData["messageserver_count"] = 0; 397 responseData["messageserver_count"] = 0;
393 398
394 IGridMessagingModule messagingModule; 399 // IGridMessagingModule messagingModule;
395 if (m_gridCore.TryGet<IGridMessagingModule>(out messagingModule)) 400 // if (m_gridCore.TryGet<IGridMessagingModule>(out messagingModule))
401 //{
402 if(m_messagingServerMapper != null)
396 { 403 {
397 List<MessageServerInfo> messageServers = messagingModule.MessageServers; 404 List<MessageServerInfo> messageServers = m_messagingServerMapper.MessageServers;
398 responseData["messageserver_count"] = messageServers.Count; 405 responseData["messageserver_count"] = messageServers.Count;
399 406
400 for (int i = 0; i < messageServers.Count; i++) 407 for (int i = 0; i < messageServers.Count; i++)