2007-05-14 03:13:47 +00:00
|
|
|
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();
|
|
|
|
|
2007-05-16 21:19:07 +00:00
|
|
|
if((string)requestData["authkey"] != recvkey) {
|
2007-05-14 03:13:47 +00:00
|
|
|
responseData["error"]="INVALID KEY";
|
|
|
|
} else {
|
|
|
|
responseData["msg"]="Shutdown command accepted";
|
|
|
|
responseData["authkey"]=sendkey;
|
|
|
|
thecallback("shutdown");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
response.Value = responseData;
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|