A bit more refactoring of the GridServer. To make the "modules" share a common Initialise method.

This commit is contained in:
MW
2009-02-21 14:19:40 +00:00
parent fcb737c7f9
commit 65d413e5ee
4 changed files with 22 additions and 19 deletions

View File

@@ -62,17 +62,18 @@ namespace OpenSim.Grid.GridServer
/// <param name="opensimVersion">
/// Used to notify old regions as to which OpenSim version to upgrade to
/// </param>
public GridRestModule(string opensimVersion, GridDBService gridDBService, IGridCore gridCore, GridConfig config)
public GridRestModule()
{
m_opensimVersion = opensimVersion;
}
public void Initialise(string opensimVersion, GridDBService gridDBService, IGridCore gridCore, GridConfig config)
{
m_opensimVersion = opensimVersion;
m_gridDBService = gridDBService;
m_gridCore = gridCore;
m_config = config;
m_httpServer = m_gridCore.GetHttpServer();
}
public void Initialise()
{
m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/sims/", RestGetSimMethod));
m_httpServer.AddStreamHandler(new RestStreamHandler("POST", "/sims/", RestSetSimMethod));