* refactor: make startup a template method
parent
5c0a0bc2e0
commit
70124a3213
|
@ -94,6 +94,11 @@ namespace OpenSim.Framework.Servers
|
|||
Thread.CurrentThread.Name = "ConsoleThread";
|
||||
ThreadTracker.Add(Thread.CurrentThread);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Must be overriden by child classes for their own server specific startup behaviour.
|
||||
/// </summary>
|
||||
protected abstract void StartupSpecific();
|
||||
|
||||
/// <summary>
|
||||
/// Print statistics to the logfile, if they are active
|
||||
|
@ -202,11 +207,13 @@ namespace OpenSim.Framework.Servers
|
|||
/// </summary>
|
||||
public virtual void Startup()
|
||||
{
|
||||
m_log.Info("[STARTUP]: Beginning startup processing");
|
||||
m_log.Info("[STARTUP]: Beginning startup processing");
|
||||
|
||||
EnhanceVersionInformation();
|
||||
|
||||
|
||||
m_log.Info("[STARTUP]: Version: " + m_version + "\n");
|
||||
|
||||
StartupSpecific();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -80,10 +80,8 @@ namespace OpenSim.Grid.AssetServer
|
|||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
public override void Startup()
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
AssetConfig config = new AssetConfig("ASSET SERVER", (Path.Combine(Util.configDir(), "AssetServer_Config.xml")));
|
||||
|
||||
m_log.Info("[ASSET]: Setting up asset DB");
|
||||
|
|
|
@ -73,10 +73,8 @@ namespace OpenSim.Grid.GridServer
|
|||
}
|
||||
}
|
||||
|
||||
public override void Startup()
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
m_config = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml")));
|
||||
|
||||
SetupGridManager();
|
||||
|
|
|
@ -62,10 +62,8 @@ namespace OpenSim.Grid.InventoryServer
|
|||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
public override void Startup()
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
InventoryConfig config = new InventoryConfig(LogName, (Path.Combine(Util.configDir(), "InventoryServer_Config.xml")));
|
||||
|
||||
m_inventoryService = new GridInventoryService(config.UserServerURL);
|
||||
|
|
|
@ -56,8 +56,6 @@ namespace OpenSim.Grid.MessagingServer
|
|||
|
||||
m_log.Info("Launching MessagingServer...");
|
||||
|
||||
|
||||
|
||||
OpenMessage_Main messageserver = new OpenMessage_Main();
|
||||
|
||||
messageserver.Startup();
|
||||
|
@ -80,10 +78,8 @@ namespace OpenSim.Grid.MessagingServer
|
|||
}
|
||||
}
|
||||
|
||||
public override void Startup()
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), "MessagingServer_Config.xml")));
|
||||
|
||||
m_log.Info("[REGION]: Starting HTTP process");
|
||||
|
|
|
@ -88,10 +88,8 @@ namespace OpenSim.Grid.UserServer
|
|||
}
|
||||
}
|
||||
|
||||
public override void Startup()
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
Cfg = new UserConfig("USER SERVER", (Path.Combine(Util.configDir(), "UserServer_Config.xml")));
|
||||
|
||||
m_stats = StatsManager.StartCollectingUserStats();
|
||||
|
|
|
@ -363,10 +363,10 @@ namespace OpenSim
|
|||
/// <summary>
|
||||
/// Performs initialisation of the scene, such as loading configuration from disk.
|
||||
/// </summary>
|
||||
public override void Startup()
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
base.StartupSpecific();
|
||||
|
||||
m_stats = StatsManager.StartCollectingSimExtraStats();
|
||||
|
||||
LibraryRootFolder libraryRootFolder = new LibraryRootFolder();
|
||||
|
|
|
@ -44,6 +44,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
private static readonly log4net.ILog m_log
|
||||
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Is throttling enabled at all?
|
||||
/// </summary>
|
||||
private bool m_enabled = true;
|
||||
|
||||
private OpenSim.Framework.BlockingQueue<LLQueItem> SendQueue;
|
||||
|
|
|
@ -71,10 +71,8 @@ namespace OpenSim.Region.ClientStack
|
|||
get { return m_sceneManager; }
|
||||
}
|
||||
|
||||
public override void Startup()
|
||||
protected override void StartupSpecific()
|
||||
{
|
||||
base.Startup();
|
||||
|
||||
m_storageManager = CreateStorageManager(m_storageConnectionString, m_estateConnectionString);
|
||||
|
||||
m_clientStackManager = CreateClientStackManager();
|
||||
|
|
Loading…
Reference in New Issue