aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
diff options
context:
space:
mode:
authorMW2009-03-03 12:51:54 +0000
committerMW2009-03-03 12:51:54 +0000
commit76133d07630d8a1547c034b28585a931f751ad1b (patch)
tree672bd4752f83c566942ce92b36a307bf187cfbea /OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
parentRenamed OpenSimBase m_autoCreateLindenStack to m_autoCreateClientStack (diff)
downloadopensim-SC_OLD-76133d07630d8a1547c034b28585a931f751ad1b.zip
opensim-SC_OLD-76133d07630d8a1547c034b28585a931f751ad1b.tar.gz
opensim-SC_OLD-76133d07630d8a1547c034b28585a931f751ad1b.tar.bz2
opensim-SC_OLD-76133d07630d8a1547c034b28585a931f751ad1b.tar.xz
Refactoring of CreateCommsManagerPlugin.
Plus some general cleanup of a few other files (deleting excess blank lines etc)
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs60
1 files changed, 28 insertions, 32 deletions
diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
index 94183c3..7323ad7 100644
--- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
+++ b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
@@ -176,10 +176,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
176 176
177 LocalBackEndServices backendService = new LocalBackEndServices(); 177 LocalBackEndServices backendService = new LocalBackEndServices();
178 178
179 LocalLoginService loginService = 179 LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService);
180 new LocalLoginService(
181 userService, m_openSim.ConfigurationSettings.StandaloneWelcomeMessage, inventoryService, backendService, m_openSim.NetServersInfo,
182 m_openSim.ConfigurationSettings.StandaloneAuthenticate, libraryRootFolder);
183 180
184 m_commsManager 181 m_commsManager
185 = new CommunicationsLocal( 182 = new CommunicationsLocal(
@@ -187,20 +184,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
187 inventoryService, backendService, userService, 184 inventoryService, backendService, userService,
188 libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile); 185 libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile);
189 186
190 // set up XMLRPC handler for client's initial login request message 187 CreateGridInfoService();
191 m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod);
192
193 // provides the web form login
194 m_httpServer.AddHTTPHandler("login", loginService.ProcessHTMLLogin);
195
196 // Provides the LLSD login
197 m_httpServer.SetDefaultLLSDHandler(loginService.LLSDLoginMethod);
198
199 // provide grid info
200 // m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini")));
201 m_gridInfoService = new GridInfoService(m_openSim.ConfigSource.Source);
202 m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod);
203 m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod));
204 } 188 }
205 189
206 protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolder) 190 protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolder)
@@ -226,11 +210,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
226 //LocalBackEndServices backendService = new LocalBackEndServices(); 210 //LocalBackEndServices backendService = new LocalBackEndServices();
227 HGGridServicesStandalone gridService = new HGGridServicesStandalone(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager); 211 HGGridServicesStandalone gridService = new HGGridServicesStandalone(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager);
228 212
229 LocalLoginService loginService = 213 LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, gridService.LocalBackend);
230 new LocalLoginService(
231 userService, m_openSim.ConfigurationSettings.StandaloneWelcomeMessage, inventoryService, gridService.LocalBackend, m_openSim.NetServersInfo,
232 m_openSim.ConfigurationSettings.StandaloneAuthenticate, libraryRootFolder);
233
234 214
235 m_commsManager = new HGCommunicationsStandalone(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, 215 m_commsManager = new HGCommunicationsStandalone(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache,
236 userService, userService, inventoryService, gridService, userService, libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile); 216 userService, userService, inventoryService, gridService, userService, libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile);
@@ -238,6 +218,26 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
238 inventoryService.UserProfileCache = m_commsManager.UserProfileCacheService; 218 inventoryService.UserProfileCache = m_commsManager.UserProfileCacheService;
239 HGServices = gridService; 219 HGServices = gridService;
240 220
221 CreateGridInfoService();
222 }
223
224
225 protected virtual void InitialiseHGGridServices(LibraryRootFolder libraryRootFolder)
226 {
227 m_commsManager = new HGCommunicationsGridMode(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager, libraryRootFolder);
228
229 HGServices = ((HGCommunicationsGridMode)m_commsManager).HGServices;
230
231 m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
232 }
233
234 private LocalLoginService CreateLoginService(LibraryRootFolder libraryRootFolder, IInterServiceInventoryServices inventoryService, LocalUserServices userService, LocalBackEndServices backendService)
235 {
236 LocalLoginService loginService =
237 new LocalLoginService(
238 userService, m_openSim.ConfigurationSettings.StandaloneWelcomeMessage, inventoryService, backendService, m_openSim.NetServersInfo,
239 m_openSim.ConfigurationSettings.StandaloneAuthenticate, libraryRootFolder);
240
241 // set up XMLRPC handler for client's initial login request message 241 // set up XMLRPC handler for client's initial login request message
242 m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); 242 m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod);
243 243
@@ -247,20 +247,16 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
247 // Provides the LLSD login 247 // Provides the LLSD login
248 m_httpServer.SetDefaultLLSDHandler(loginService.LLSDLoginMethod); 248 m_httpServer.SetDefaultLLSDHandler(loginService.LLSDLoginMethod);
249 249
250 return loginService;
251 }
252
253 private void CreateGridInfoService()
254 {
250 // provide grid info 255 // provide grid info
251 // m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini"))); 256 // m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini")));
252 m_gridInfoService = new GridInfoService(m_openSim.ConfigSource.Source); 257 m_gridInfoService = new GridInfoService(m_openSim.ConfigSource.Source);
253 m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); 258 m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod);
254 m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); 259 m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod));
255 } 260 }
256
257 protected virtual void InitialiseHGGridServices(LibraryRootFolder libraryRootFolder)
258 {
259 m_commsManager = new HGCommunicationsGridMode(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager, libraryRootFolder);
260
261 HGServices = ((HGCommunicationsGridMode)m_commsManager).HGServices;
262
263 m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
264 }
265 } 261 }
266} 262}