From 64a98c736848de6099254f23483058668273c1a5 Mon Sep 17 00:00:00 2001 From: gareth Date: Mon, 14 May 2007 03:13:47 +0000 Subject: Finished off adding the new management API to gridserver Updated VersionInfo.cs finally Updated prebuild and rebuilt nant build files Completed Management agent basics --- OpenGrid.Framework.Manager/GridServerManager.cs | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 OpenGrid.Framework.Manager/GridServerManager.cs (limited to 'OpenGrid.Framework.Manager/GridServerManager.cs') 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 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Nwc.XmlRpc; + + +namespace OpenGrid.Framework.Manager { + + public class GridServerManager + { + public static GridManagerCallback thecallback; + + public static string sendkey; + public static string recvkey; + + public static XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) + { + XmlRpcResponse response = new XmlRpcResponse(); + Hashtable requestData = (Hashtable)request.Params[0]; + Hashtable responseData = new Hashtable(); + + if(requestData["authkey"]!=recvkey) { + responseData["error"]="INVALID KEY"; + } else { + responseData["msg"]="Shutdown command accepted"; + responseData["authkey"]=sendkey; + thecallback("shutdown"); + } + + + response.Value = responseData; + return response; + } + } +} + -- cgit v1.1