aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-06-02 01:15:47 +0000
committerAdam Frisby2007-06-02 01:15:47 +0000
commitbad9cdae1e939d2af5baa0164619aa4b8628c319 (patch)
tree8c059bf091cc84cd982e10aeae63b9d93a81403e /OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
parent* Documented SQLite grid interfaces (diff)
downloadopensim-SC_OLD-bad9cdae1e939d2af5baa0164619aa4b8628c319.zip
opensim-SC_OLD-bad9cdae1e939d2af5baa0164619aa4b8628c319.tar.gz
opensim-SC_OLD-bad9cdae1e939d2af5baa0164619aa4b8628c319.tar.bz2
opensim-SC_OLD-bad9cdae1e939d2af5baa0164619aa4b8628c319.tar.xz
* GridManagementAgent is now documented
Diffstat (limited to 'OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs')
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs67
1 files changed, 65 insertions, 2 deletions
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs b/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
index f4483fb..0ee0e3d 100644
--- a/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
+++ b/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
@@ -1,3 +1,29 @@
1/*
2* Copyright (c) OpenSim project, http://sim.opensecondlife.org/
3*
4* Redistribution and use in source and binary forms, with or without
5* modification, are permitted provided that the following conditions are met:
6* * Redistributions of source code must retain the above copyright
7* notice, this list of conditions and the following disclaimer.
8* * Redistributions in binary form must reproduce the above copyright
9* notice, this list of conditions and the following disclaimer in the
10* documentation and/or other materials provided with the distribution.
11* * Neither the name of the <organization> nor the
12* names of its contributors may be used to endorse or promote products
13* derived from this software without specific prior written permission.
14*
15* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
16* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
19* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*
26*/
1using Nwc.XmlRpc; 27using Nwc.XmlRpc;
2using OpenSim.Framework; 28using OpenSim.Framework;
3using OpenSim.Servers; 29using OpenSim.Servers;
@@ -7,19 +33,46 @@ using libsecondlife;
7 33
8namespace OpenGrid.Framework.Manager 34namespace OpenGrid.Framework.Manager
9{ 35{
10 36 /// <summary>
37 /// Used to pass messages to the gridserver
38 /// </summary>
39 /// <param name="param">Pass this argument</param>
11 public delegate void GridManagerCallback(string param); 40 public delegate void GridManagerCallback(string param);
12 41
42 /// <summary>
43 /// Serverside listener for grid commands
44 /// </summary>
13 public class GridManagementAgent 45 public class GridManagementAgent
14 { 46 {
15 47 /// <summary>
48 /// Passes grid server messages
49 /// </summary>
16 private GridManagerCallback thecallback; 50 private GridManagerCallback thecallback;
51
52 /// <summary>
53 /// Security keys
54 /// </summary>
17 private string sendkey; 55 private string sendkey;
18 private string recvkey; 56 private string recvkey;
57
58 /// <summary>
59 /// Our component type
60 /// </summary>
19 private string component_type; 61 private string component_type;
20 62
63 /// <summary>
64 /// List of active sessions
65 /// </summary>
21 private static ArrayList Sessions; 66 private static ArrayList Sessions;
22 67
68 /// <summary>
69 /// Initialises a new GridManagementAgent
70 /// </summary>
71 /// <param name="app_httpd">HTTP Daemon for this server</param>
72 /// <param name="component_type">What component type are we?</param>
73 /// <param name="sendkey">Security send key</param>
74 /// <param name="recvkey">Security recieve key</param>
75 /// <param name="thecallback">Message callback</param>
23 public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback) 76 public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback)
24 { 77 {
25 this.sendkey = sendkey; 78 this.sendkey = sendkey;
@@ -41,11 +94,21 @@ namespace OpenGrid.Framework.Manager
41 } 94 }
42 } 95 }
43 96
97 /// <summary>
98 /// Checks if a session exists
99 /// </summary>
100 /// <param name="sessionID">The session ID</param>
101 /// <returns>Exists?</returns>
44 public static bool SessionExists(LLUUID sessionID) 102 public static bool SessionExists(LLUUID sessionID)
45 { 103 {
46 return Sessions.Contains(sessionID); 104 return Sessions.Contains(sessionID);
47 } 105 }
48 106
107 /// <summary>
108 /// Logs a new session to the grid manager
109 /// </summary>
110 /// <param name="request">the XMLRPC request</param>
111 /// <returns>An XMLRPC reply</returns>
49 public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) 112 public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
50 { 113 {
51 XmlRpcResponse response = new XmlRpcResponse(); 114 XmlRpcResponse response = new XmlRpcResponse();