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)
{
m_core = gridServer;
}
public void PostInitialise()
{
GridModuleLoader<IGridServiceModule> moduleLoader = new GridModuleLoader<IGridServiceModule>();
m_modules = moduleLoader.PickupModules(".");

View File

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

View File

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

View File

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

View File

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