mirror of
https://github.com/opensim/opensim.git
synced 2026-06-09 05:05:51 +08:00
More structural changes to new SE
This commit is contained in:
@@ -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,13 +32,14 @@ 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;
|
||||
m_log = logger;
|
||||
}
|
||||
|
||||
public ScriptEngineInterface LoadScriptEngine(string EngineName)
|
||||
|
||||
41
OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngines.cs
Normal file
41
OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngines.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user