More structural changes to new SE
parent
323234f82a
commit
0eac34b7ab
|
@ -5,7 +5,7 @@ using System.Text;
|
|||
namespace OpenSim.Grid.ScriptServer
|
||||
{
|
||||
// Maintains connection and communication to a region
|
||||
class RegionConnectionManager
|
||||
internal class RegionConnectionManager
|
||||
{
|
||||
|
||||
public RegionConnectionManager()
|
||||
|
|
|
@ -29,20 +29,25 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Grid.ScriptServer
|
||||
{
|
||||
// Waiting for incoming script requests from region
|
||||
internal class RegionScriptDaemon
|
||||
internal class RegionCommManager
|
||||
{
|
||||
private Thread listenThread;
|
||||
|
||||
public ScriptServerMain m_ScriptServer;
|
||||
public RegionScriptDaemon(ScriptServerMain scriptServer)
|
||||
private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>();
|
||||
|
||||
private LogBase m_log;
|
||||
private ScriptServerMain m_ScriptServerMain;
|
||||
public RegionCommManager(ScriptServerMain scm, LogBase logger)
|
||||
{
|
||||
m_ScriptServer = scriptServer;
|
||||
m_ScriptServerMain = scm;
|
||||
m_log = logger;
|
||||
}
|
||||
~RegionScriptDaemon()
|
||||
~RegionCommManager()
|
||||
{
|
||||
Stop();
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Grid.ScriptServer
|
||||
{
|
||||
// Maintains all regions
|
||||
class RegionsManager
|
||||
{
|
||||
private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>();
|
||||
|
||||
public ScriptServerMain m_ScriptServer;
|
||||
public RegionsManager(ScriptServerMain scriptServer)
|
||||
{
|
||||
m_ScriptServer = scriptServer;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -32,10 +32,11 @@ using OpenSim.Framework.Console;
|
|||
|
||||
namespace OpenSim.Grid.ScriptServer
|
||||
{
|
||||
public class ScriptEngineLoader
|
||||
internal class ScriptEngineLoader
|
||||
{
|
||||
private LogBase m_log;
|
||||
|
||||
|
||||
public ScriptEngineLoader(LogBase logger)
|
||||
{
|
||||
m_log = logger;
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Grid.ScriptServer
|
||||
{
|
||||
internal class ScriptEngines
|
||||
{
|
||||
private LogBase m_log;
|
||||
private ScriptEngineLoader ScriptEngineLoader;
|
||||
private List<ScriptEngineInterface> scriptEngines = new List<ScriptEngineInterface>();
|
||||
private ScriptServerMain m_ScriptServerMain;
|
||||
|
||||
// Initialize
|
||||
public ScriptEngines(ScriptServerMain scm, LogBase logger)
|
||||
{
|
||||
m_ScriptServerMain = scm;
|
||||
m_log = logger;
|
||||
ScriptEngineLoader = new ScriptEngineLoader(m_log);
|
||||
|
||||
// Temp - we should not load during initialize... Loading should be done later.
|
||||
LoadEngine("DotNetScriptEngine");
|
||||
}
|
||||
~ScriptEngines()
|
||||
{
|
||||
}
|
||||
|
||||
public void LoadEngine(string engineName)
|
||||
{
|
||||
// Load and add to list of ScriptEngines
|
||||
ScriptEngineInterface sei = ScriptEngineLoader.LoadScriptEngine(engineName);
|
||||
if (sei != null)
|
||||
{
|
||||
scriptEngines.Add(sei);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -7,21 +7,20 @@ using OpenSim.Framework.Utilities;
|
|||
|
||||
namespace OpenSim.Grid.ScriptServer
|
||||
{
|
||||
class ScriptServerMain : conscmd_callback
|
||||
public class ScriptServerMain : conscmd_callback
|
||||
{
|
||||
private readonly string m_logFilename = ("region-console.log");
|
||||
public RegionScriptDaemon RegionScriptDaemon; // Listen for incoming from region
|
||||
public RegionsManager RegionManager; // Handle regions
|
||||
public ScriptEngineLoader ScriptEngineLoader; // Loads scriptengines
|
||||
internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region
|
||||
internal ScriptEngines ScriptEngines; // Loads scriptengines
|
||||
private LogBase m_log;
|
||||
|
||||
public ScriptServerMain()
|
||||
{
|
||||
m_log = CreateLog();
|
||||
|
||||
RegionScriptDaemon = new RegionScriptDaemon(this);
|
||||
RegionManager = new RegionsManager(this);
|
||||
ScriptEngineLoader = new ScriptEngineLoader(m_log);
|
||||
RegionScriptDaemon = new RegionCommManager(this, m_log);
|
||||
ScriptEngines = new ScriptEngines(this, m_log);
|
||||
|
||||
}
|
||||
|
||||
~ScriptServerMain()
|
||||
|
|
Loading…
Reference in New Issue