From 03efaff60e2c4204bfac33de22e69377ba28be7c Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 28 Jul 2008 12:18:48 +0000 Subject: moving GridInfo application plugin into a common standalone/grid service, adding a plain REST GET handler returning XML (no LLSD), adding appropriate add handler calls to OpenSimBase and UserServer. --- OpenSim/Grid/UserServer/Main.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Grid/UserServer') diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 1338d68..a9b4a4f 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -39,6 +39,7 @@ using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Statistics; +using OpenSim.Common.Communications; using OpenSim.Grid.Communications.OGS1; namespace OpenSim.Grid.UserServer @@ -53,6 +54,7 @@ namespace OpenSim.Grid.UserServer public UserManager m_userManager; public UserLoginService m_loginService; + public GridInfoService m_gridInfoService; public MessageServersConnector m_messagesService; protected IInterServiceInventoryServices m_interServiceInventoryService; @@ -100,6 +102,8 @@ namespace OpenSim.Grid.UserServer m_userManager._config = Cfg; m_userManager.AddPlugin(Cfg.DatabaseProvider, Cfg.DatabaseConnect); + m_gridInfoService = new GridInfoService(); + m_interServiceInventoryService = new OGS1InterServiceInventoryService(m_userManager._config.InventoryUrl); m_loginService = new UserLoginService( @@ -148,6 +152,9 @@ namespace OpenSim.Grid.UserServer m_httpServer.AddXmlRPCHandler("agent_change_region", m_messagesService.XmlRPCUserMovedtoRegion); m_httpServer.AddXmlRPCHandler("deregister_messageserver", m_messagesService.XmlRPCDeRegisterMessageServer); + m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); + m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); + m_httpServer.AddStreamHandler( new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); -- cgit v1.1