aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
diff options
context:
space:
mode:
authorMW2007-06-08 16:49:24 +0000
committerMW2007-06-08 16:49:24 +0000
commita8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93 (patch)
treed9c04b9241c67f892285bc2b9fb05b1e70e40576 /OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
parentprebuild.xml should be fixed/updated. (diff)
downloadopensim-SC_OLD-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.zip
opensim-SC_OLD-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.tar.gz
opensim-SC_OLD-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.tar.bz2
opensim-SC_OLD-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.tar.xz
Deleted OpenGridServices folder as the easiest way to reimport the latest version from trunk
Diffstat (limited to 'OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs')
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs50
1 files changed, 0 insertions, 50 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs b/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
deleted file mode 100644
index 7ebf66a..0000000
--- a/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
+++ /dev/null
@@ -1,50 +0,0 @@
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using Nwc.XmlRpc;
5using System.Threading;
6using libsecondlife;
7
8namespace OpenGrid.Framework.Manager {
9
10 public class GridServerManager
11 {
12 public static GridManagerCallback thecallback;
13
14 public static string sendkey;
15 public static string recvkey;
16
17 public static XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request)
18 {
19 XmlRpcResponse response = new XmlRpcResponse();
20 Hashtable requestData = (Hashtable)request.Params[0];
21 Hashtable responseData = new Hashtable();
22
23 if(requestData.ContainsKey("session_id")) {
24 if(GridManagementAgent.SessionExists(new LLUUID((string)requestData["session_id"]))) {
25 responseData["msg"]="Shutdown command accepted";
26 (new Thread(new ThreadStart(ZOMGServerIsNowTerminallyIll))).Start();
27 } else {
28 response.IsFault=true;
29 responseData["error"]="bad session ID";
30 }
31 } else {
32 response.IsFault=true;
33 responseData["error"]="no session ID";
34 }
35
36 response.Value = responseData;
37 return response;
38 }
39
40 // Brought to by late-night coding
41 public static void ZOMGServerIsNowTerminallyIll()
42 {
43 Console.WriteLine("ZOMG! THIS SERVER IS TERMINALLY ILL - WE GOT A SHUTDOWN REQUEST FROM A GRID MANAGER!!!!");
44 Console.WriteLine("We have 3 seconds to live...");
45 Thread.Sleep(3000);
46 thecallback("shutdown");
47 }
48 }
49}
50