A bit more refactoring of the GridServer. To make the "modules" share a common Initialise method.
parent
fcb737c7f9
commit
65d413e5ee
|
@ -34,17 +34,18 @@ namespace OpenSim.Grid.GridServer
|
|||
get { return _MessageServers; }
|
||||
}
|
||||
|
||||
public GridMessagingModule(string opensimVersion, GridDBService gridDBService, IGridCore gridCore, GridConfig config)
|
||||
public GridMessagingModule()
|
||||
{
|
||||
}
|
||||
|
||||
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_gridCore.RegisterInterface<IGridMessagingModule>(this);
|
||||
// Message Server ---> Grid Server
|
||||
m_httpServer.AddXmlRPCHandler("register_messageserver", XmlRPCRegisterMessageServer);
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
|
|
|
@ -155,14 +155,14 @@ namespace OpenSim.Grid.GridServer
|
|||
m_gridDBService = new GridDBService();
|
||||
m_gridDBService.AddPlugin(m_config.DatabaseProvider, m_config.DatabaseConnect);
|
||||
|
||||
m_gridMessageModule = new GridMessagingModule(m_version, m_gridDBService, this, m_config);
|
||||
m_gridMessageModule.Initialise();
|
||||
m_gridMessageModule = new GridMessagingModule();
|
||||
m_gridMessageModule.Initialise(m_version, m_gridDBService, this, m_config);
|
||||
|
||||
m_gridXmlRpcModule = new GridXmlRpcModule(m_version, m_gridDBService, this, m_config);
|
||||
m_gridXmlRpcModule.Initialise();
|
||||
m_gridXmlRpcModule = new GridXmlRpcModule();
|
||||
m_gridXmlRpcModule.Initialise(m_version, m_gridDBService, this, m_config);
|
||||
|
||||
m_gridRestModule = new GridRestModule(m_version, m_gridDBService, this, m_config);
|
||||
m_gridRestModule.Initialise();
|
||||
m_gridRestModule = new GridRestModule();
|
||||
m_gridRestModule.Initialise(m_version, m_gridDBService, this, m_config);
|
||||
}
|
||||
|
||||
public void CheckSims(object sender, ElapsedEventArgs e)
|
||||
|
|
|
@ -63,17 +63,18 @@ namespace OpenSim.Grid.GridServer
|
|||
/// <param name="opensimVersion">
|
||||
/// Used to notify old regions as to which OpenSim version to upgrade to
|
||||
/// </param>
|
||||
public GridXmlRpcModule(string opensimVersion, GridDBService gridDBService, IGridCore gridCore, GridConfig config)
|
||||
public GridXmlRpcModule()
|
||||
{
|
||||
}
|
||||
|
||||
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.AddXmlRPCHandler("simulator_login", XmlRpcSimulatorLoginMethod);
|
||||
m_httpServer.AddXmlRPCHandler("simulator_data_request", XmlRpcSimulatorDataRequestMethod);
|
||||
m_httpServer.AddXmlRPCHandler("simulator_after_region_moved", XmlRpcDeleteRegionMethod);
|
||||
|
|
Loading…
Reference in New Issue