diff options
author | MW | 2007-06-08 16:49:24 +0000 |
---|---|---|
committer | MW | 2007-06-08 16:49:24 +0000 |
commit | a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93 (patch) | |
tree | d9c04b9241c67f892285bc2b9fb05b1e70e40576 /OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs | |
parent | prebuild.xml should be fixed/updated. (diff) | |
download | opensim-SC-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.zip opensim-SC-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.tar.gz opensim-SC-a8cabbd600f2bf4e3ecd8b48d726f9c1036d9f93.tar.bz2 opensim-SC-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.cs | 50 |
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 @@ | |||
1 | using System; | ||
2 | using System.Collections; | ||
3 | using System.Collections.Generic; | ||
4 | using Nwc.XmlRpc; | ||
5 | using System.Threading; | ||
6 | using libsecondlife; | ||
7 | |||
8 | namespace 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 | |||