Added PostInitialise method to IGridPlugin.

Changes it so the loading of IGridServiceModules is done in the loaders PostInitialise method so that all IGridPlugin are initialised before any IGridServerModules.
GenericGridServerConcept
MW 2009-05-15 12:09:29 +00:00
parent 78f4f49965
commit 66dc459a06
5 changed files with 18 additions and 0 deletions

View File

@ -20,7 +20,10 @@ namespace OpenSim.Grid.GridServer.ModuleLoader
public void Initialise(GridServerBase gridServer) public void Initialise(GridServerBase gridServer)
{ {
m_core = gridServer; m_core = gridServer;
}
public void PostInitialise()
{
GridModuleLoader<IGridServiceModule> moduleLoader = new GridModuleLoader<IGridServiceModule>(); GridModuleLoader<IGridServiceModule> moduleLoader = new GridModuleLoader<IGridServiceModule>();
m_modules = moduleLoader.PickupModules("."); m_modules = moduleLoader.PickupModules(".");

View File

@ -43,6 +43,10 @@ namespace OpenSim.Grid.GridServer.Modules
SetupGridServices(); SetupGridServices();
} }
public void PostInitialise()
{
}
#endregion #endregion
#region IPlugin Members #region IPlugin Members

View File

@ -128,6 +128,11 @@ namespace OpenSim.Grid.GridServer
LoadPlugins(); LoadPlugins();
} }
foreach (IGridPlugin plugin in m_plugins)
{
plugin.PostInitialise();
}
m_httpServer.Start(); m_httpServer.Start();
} }

View File

@ -33,6 +33,7 @@ namespace OpenSim.Grid.GridServer
public interface IGridPlugin : IPlugin public interface IGridPlugin : IPlugin
{ {
void Initialise(GridServerBase gridServer); void Initialise(GridServerBase gridServer);
void PostInitialise();
} }
public class GridPluginInitialiser : PluginInitialiserBase public class GridPluginInitialiser : PluginInitialiserBase

View File

@ -75,6 +75,11 @@ namespace OpenSim.Grid.UserServer.Modules
Initialise(gridServer.HttpServer, gridServer, gridServer.UConfig); Initialise(gridServer.HttpServer, gridServer, gridServer.UConfig);
} }
public void PostInitialise()
{
}
#endregion #endregion
public void Initialise(BaseHttpServer httpServer, IGridServiceCore core, UserConfig config) public void Initialise(BaseHttpServer httpServer, IGridServiceCore core, UserConfig config)