diff options
author | Tedd Hansen | 2007-09-24 13:57:16 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-09-24 13:57:16 +0000 |
commit | 0eac34b7ab0b557733906da3390a07fda250ae4d (patch) | |
tree | a84f05757b9b652eee21fa7c3604a3e99e8177d1 /OpenSim/Grid/ScriptServer | |
parent | Reorganized some files (diff) | |
download | opensim-SC-0eac34b7ab0b557733906da3390a07fda250ae4d.zip opensim-SC-0eac34b7ab0b557733906da3390a07fda250ae4d.tar.gz opensim-SC-0eac34b7ab0b557733906da3390a07fda250ae4d.tar.bz2 opensim-SC-0eac34b7ab0b557733906da3390a07fda250ae4d.tar.xz |
More structural changes to new SE
Diffstat (limited to 'OpenSim/Grid/ScriptServer')
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs | 2 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs (renamed from OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionScriptDaemon.cs) | 15 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/RegionsManager.cs | 19 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngine/ScriptEngineLoader.cs | 5 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngines.cs | 41 | ||||
-rw-r--r-- | OpenSim/Grid/ScriptServer/ScriptServerMain.cs | 13 |
6 files changed, 61 insertions, 34 deletions
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs index 6a517e9..7171b82 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs | |||
@@ -5,7 +5,7 @@ using System.Text; | |||
5 | namespace OpenSim.Grid.ScriptServer | 5 | namespace OpenSim.Grid.ScriptServer |
6 | { | 6 | { |
7 | // Maintains connection and communication to a region | 7 | // Maintains connection and communication to a region |
8 | class RegionConnectionManager | 8 | internal class RegionConnectionManager |
9 | { | 9 | { |
10 | 10 | ||
11 | public RegionConnectionManager() | 11 | public RegionConnectionManager() |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionScriptDaemon.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs index 0385693..d609d63 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionScriptDaemon.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs | |||
@@ -29,20 +29,25 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using System.Threading; | 31 | using System.Threading; |
32 | using OpenSim.Framework.Console; | ||
32 | 33 | ||
33 | namespace OpenSim.Grid.ScriptServer | 34 | namespace OpenSim.Grid.ScriptServer |
34 | { | 35 | { |
35 | // Waiting for incoming script requests from region | 36 | // Waiting for incoming script requests from region |
36 | internal class RegionScriptDaemon | 37 | internal class RegionCommManager |
37 | { | 38 | { |
38 | private Thread listenThread; | 39 | private Thread listenThread; |
39 | 40 | ||
40 | public ScriptServerMain m_ScriptServer; | 41 | private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); |
41 | public RegionScriptDaemon(ScriptServerMain scriptServer) | 42 | |
43 | private LogBase m_log; | ||
44 | private ScriptServerMain m_ScriptServerMain; | ||
45 | public RegionCommManager(ScriptServerMain scm, LogBase logger) | ||
42 | { | 46 | { |
43 | m_ScriptServer = scriptServer; | 47 | m_ScriptServerMain = scm; |
48 | m_log = logger; | ||
44 | } | 49 | } |
45 | ~RegionScriptDaemon() | 50 | ~RegionCommManager() |
46 | { | 51 | { |
47 | Stop(); | 52 | Stop(); |
48 | } | 53 | } |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionsManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionsManager.cs deleted file mode 100644 index eeec92b..0000000 --- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionsManager.cs +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Grid.ScriptServer | ||
6 | { | ||
7 | // Maintains all regions | ||
8 | class RegionsManager | ||
9 | { | ||
10 | private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); | ||
11 | |||
12 | public ScriptServerMain m_ScriptServer; | ||
13 | public RegionsManager(ScriptServerMain scriptServer) | ||
14 | { | ||
15 | m_ScriptServer = scriptServer; | ||
16 | } | ||
17 | |||
18 | } | ||
19 | } | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngine/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngine/ScriptEngineLoader.cs index 1b5dc39..8b07ab0 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngine/ScriptEngineLoader.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngine/ScriptEngineLoader.cs | |||
@@ -32,13 +32,14 @@ using OpenSim.Framework.Console; | |||
32 | 32 | ||
33 | namespace OpenSim.Grid.ScriptServer | 33 | namespace OpenSim.Grid.ScriptServer |
34 | { | 34 | { |
35 | public class ScriptEngineLoader | 35 | internal class ScriptEngineLoader |
36 | { | 36 | { |
37 | private LogBase m_log; | 37 | private LogBase m_log; |
38 | 38 | ||
39 | |||
39 | public ScriptEngineLoader(LogBase logger) | 40 | public ScriptEngineLoader(LogBase logger) |
40 | { | 41 | { |
41 | m_log = logger; | 42 | m_log = logger; |
42 | } | 43 | } |
43 | 44 | ||
44 | public ScriptEngineInterface LoadScriptEngine(string EngineName) | 45 | public ScriptEngineInterface LoadScriptEngine(string EngineName) |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngines.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngines.cs new file mode 100644 index 0000000..0313edf --- /dev/null +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngines.cs | |||
@@ -0,0 +1,41 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenSim.Framework.Console; | ||
5 | |||
6 | namespace OpenSim.Grid.ScriptServer | ||
7 | { | ||
8 | internal class ScriptEngines | ||
9 | { | ||
10 | private LogBase m_log; | ||
11 | private ScriptEngineLoader ScriptEngineLoader; | ||
12 | private List<ScriptEngineInterface> scriptEngines = new List<ScriptEngineInterface>(); | ||
13 | private ScriptServerMain m_ScriptServerMain; | ||
14 | |||
15 | // Initialize | ||
16 | public ScriptEngines(ScriptServerMain scm, LogBase logger) | ||
17 | { | ||
18 | m_ScriptServerMain = scm; | ||
19 | m_log = logger; | ||
20 | ScriptEngineLoader = new ScriptEngineLoader(m_log); | ||
21 | |||
22 | // Temp - we should not load during initialize... Loading should be done later. | ||
23 | LoadEngine("DotNetScriptEngine"); | ||
24 | } | ||
25 | ~ScriptEngines() | ||
26 | { | ||
27 | } | ||
28 | |||
29 | public void LoadEngine(string engineName) | ||
30 | { | ||
31 | // Load and add to list of ScriptEngines | ||
32 | ScriptEngineInterface sei = ScriptEngineLoader.LoadScriptEngine(engineName); | ||
33 | if (sei != null) | ||
34 | { | ||
35 | scriptEngines.Add(sei); | ||
36 | } | ||
37 | } | ||
38 | |||
39 | |||
40 | } | ||
41 | } | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs index 4fce3d6..f85cf98 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs | |||
@@ -7,21 +7,20 @@ using OpenSim.Framework.Utilities; | |||
7 | 7 | ||
8 | namespace OpenSim.Grid.ScriptServer | 8 | namespace OpenSim.Grid.ScriptServer |
9 | { | 9 | { |
10 | class ScriptServerMain : conscmd_callback | 10 | public class ScriptServerMain : conscmd_callback |
11 | { | 11 | { |
12 | private readonly string m_logFilename = ("region-console.log"); | 12 | private readonly string m_logFilename = ("region-console.log"); |
13 | public RegionScriptDaemon RegionScriptDaemon; // Listen for incoming from region | 13 | internal RegionCommManager RegionScriptDaemon; // Listen for incoming from region |
14 | public RegionsManager RegionManager; // Handle regions | 14 | internal ScriptEngines ScriptEngines; // Loads scriptengines |
15 | public ScriptEngineLoader ScriptEngineLoader; // Loads scriptengines | ||
16 | private LogBase m_log; | 15 | private LogBase m_log; |
17 | 16 | ||
18 | public ScriptServerMain() | 17 | public ScriptServerMain() |
19 | { | 18 | { |
20 | m_log = CreateLog(); | 19 | m_log = CreateLog(); |
21 | 20 | ||
22 | RegionScriptDaemon = new RegionScriptDaemon(this); | 21 | RegionScriptDaemon = new RegionCommManager(this, m_log); |
23 | RegionManager = new RegionsManager(this); | 22 | ScriptEngines = new ScriptEngines(this, m_log); |
24 | ScriptEngineLoader = new ScriptEngineLoader(m_log); | 23 | |
25 | } | 24 | } |
26 | 25 | ||
27 | ~ScriptServerMain() | 26 | ~ScriptServerMain() |