aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/GridServer/GridServerBase.cs
diff options
context:
space:
mode:
authorAdam Frisby2008-05-01 18:04:42 +0000
committerAdam Frisby2008-05-01 18:04:42 +0000
commit20a9bf08f51351e1e0a9de94f184ff56cd572665 (patch)
tree52da64dab26353b903c8e4befed0178fa72a188b /OpenSim/Grid/GridServer/GridServerBase.cs
parentMore config cleanup in LaunchSLClient. (diff)
downloadopensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.zip
opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.gz
opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.bz2
opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.xz
* Rolled back a few changes.
Diffstat (limited to 'OpenSim/Grid/GridServer/GridServerBase.cs')
-rw-r--r--OpenSim/Grid/GridServer/GridServerBase.cs60
1 files changed, 28 insertions, 32 deletions
diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs
index ac33a6c..2feaac3 100644
--- a/OpenSim/Grid/GridServer/GridServerBase.cs
+++ b/OpenSim/Grid/GridServer/GridServerBase.cs
@@ -44,34 +44,6 @@ namespace OpenSim.Grid.GridServer
44 protected GridManager m_gridManager; 44 protected GridManager m_gridManager;
45 protected List<IGridPlugin> m_plugins = new List<IGridPlugin>(); 45 protected List<IGridPlugin> m_plugins = new List<IGridPlugin>();
46 46
47 public GridServerBase()
48 {
49 m_console = new ConsoleBase("OpenGrid", this);
50 MainConsole.Instance = m_console;
51 }
52
53 #region conscmd_callback Members
54
55 public override void RunCmd(string cmd, string[] cmdparams)
56 {
57 base.RunCmd(cmd, cmdparams);
58
59 switch (cmd)
60 {
61 case "help":
62 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
63 break;
64
65 case "shutdown":
66 foreach (IGridPlugin plugin in m_plugins) plugin.Close();
67 m_console.Close();
68 Environment.Exit(0);
69 break;
70 }
71 }
72
73 #endregion
74
75 public void Work() 47 public void Work()
76 { 48 {
77 m_console.Notice("Enter help for a list of commands\n"); 49 m_console.Notice("Enter help for a list of commands\n");
@@ -82,6 +54,12 @@ namespace OpenSim.Grid.GridServer
82 } 54 }
83 } 55 }
84 56
57 public GridServerBase()
58 {
59 m_console = new ConsoleBase("OpenGrid", this);
60 MainConsole.Instance = m_console;
61 }
62
85 public void managercallback(string cmd) 63 public void managercallback(string cmd)
86 { 64 {
87 switch (cmd) 65 switch (cmd)
@@ -105,14 +83,14 @@ namespace OpenSim.Grid.GridServer
105 83
106 AddHttpHandlers(); 84 AddHttpHandlers();
107 85
108 LoadGridPlugins(); 86 LoadGridPlugins( );
109 87
110 m_httpServer.Start(); 88 m_httpServer.Start();
111 89
112 m_console.Status("[GRID]: Starting sim status checker"); 90 m_console.Status("[GRID]: Starting sim status checker");
113 91
114 Timer simCheckTimer = new Timer(3600000 * 3); // 3 Hours between updates. 92 Timer simCheckTimer = new Timer(3600000 * 3); // 3 Hours between updates.
115 simCheckTimer.Elapsed += CheckSims; 93 simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
116 simCheckTimer.Enabled = true; 94 simCheckTimer.Enabled = true;
117 } 95 }
118 96
@@ -144,7 +122,7 @@ namespace OpenSim.Grid.GridServer
144 foreach (TypeExtensionNode node in nodes) 122 foreach (TypeExtensionNode node in nodes)
145 { 123 {
146 m_console.Status("[GRIDPLUGINS]: Loading OpenSim plugin " + node.Path); 124 m_console.Status("[GRIDPLUGINS]: Loading OpenSim plugin " + node.Path);
147 IGridPlugin plugin = (IGridPlugin) node.CreateInstance(); 125 IGridPlugin plugin = (IGridPlugin)node.CreateInstance();
148 plugin.Initialise(this); 126 plugin.Initialise(this);
149 m_plugins.Add(plugin); 127 m_plugins.Add(plugin);
150 } 128 }
@@ -199,5 +177,23 @@ namespace OpenSim.Grid.GridServer
199 } 177 }
200 */ 178 */
201 } 179 }
180
181 public override void RunCmd(string cmd, string[] cmdparams)
182 {
183 base.RunCmd(cmd, cmdparams);
184
185 switch (cmd)
186 {
187 case "help":
188 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
189 break;
190
191 case "shutdown":
192 foreach (IGridPlugin plugin in m_plugins) plugin.Close();
193 m_console.Close();
194 Environment.Exit(0);
195 break;
196 }
197 }
202 } 198 }
203} \ No newline at end of file 199}