diff options
author | gareth | 2007-05-14 03:13:47 +0000 |
---|---|---|
committer | gareth | 2007-05-14 03:13:47 +0000 |
commit | 64a98c736848de6099254f23483058668273c1a5 (patch) | |
tree | a8f2624277e48814531750db0ec07a8d64c1f740 /OpenGrid.Framework.Manager/GridServerManager.cs | |
parent | Added skeleton for grid management agent (diff) | |
download | opensim-SC-64a98c736848de6099254f23483058668273c1a5.zip opensim-SC-64a98c736848de6099254f23483058668273c1a5.tar.gz opensim-SC-64a98c736848de6099254f23483058668273c1a5.tar.bz2 opensim-SC-64a98c736848de6099254f23483058668273c1a5.tar.xz |
Finished off adding the new management API to gridserver
Updated VersionInfo.cs finally
Updated prebuild and rebuilt nant build files
Completed Management agent basics
Diffstat (limited to 'OpenGrid.Framework.Manager/GridServerManager.cs')
-rw-r--r-- | OpenGrid.Framework.Manager/GridServerManager.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenGrid.Framework.Manager/GridServerManager.cs b/OpenGrid.Framework.Manager/GridServerManager.cs new file mode 100644 index 0000000..16ea6e8 --- /dev/null +++ b/OpenGrid.Framework.Manager/GridServerManager.cs | |||
@@ -0,0 +1,36 @@ | |||
1 | using System; | ||
2 | using System.Collections; | ||
3 | using System.Collections.Generic; | ||
4 | using Nwc.XmlRpc; | ||
5 | |||
6 | |||
7 | namespace OpenGrid.Framework.Manager { | ||
8 | |||
9 | public class GridServerManager | ||
10 | { | ||
11 | public static GridManagerCallback thecallback; | ||
12 | |||
13 | public static string sendkey; | ||
14 | public static string recvkey; | ||
15 | |||
16 | public static XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) | ||
17 | { | ||
18 | XmlRpcResponse response = new XmlRpcResponse(); | ||
19 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
20 | Hashtable responseData = new Hashtable(); | ||
21 | |||
22 | if(requestData["authkey"]!=recvkey) { | ||
23 | responseData["error"]="INVALID KEY"; | ||
24 | } else { | ||
25 | responseData["msg"]="Shutdown command accepted"; | ||
26 | responseData["authkey"]=sendkey; | ||
27 | thecallback("shutdown"); | ||
28 | } | ||
29 | |||
30 | |||
31 | response.Value = responseData; | ||
32 | return response; | ||
33 | } | ||
34 | } | ||
35 | } | ||
36 | |||