aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r--OpenSim/Grid/Framework/IGridServiceCore.cs80
-rw-r--r--OpenSim/Grid/Framework/IGridServiceModule.cs26
-rw-r--r--OpenSim/Grid/Framework/IInterServiceUserService.cs70
-rw-r--r--OpenSim/Grid/Framework/IMessageRegionLookup.cs76
-rw-r--r--OpenSim/Grid/Framework/IMessagingServerDiscovery.cs80
-rw-r--r--OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs372
-rw-r--r--OpenSim/Grid/UserServer.Modules/GridInfoServiceModule.cs154
-rw-r--r--OpenSim/Grid/UserServer/UserServerEventDispatchModule.cs282
8 files changed, 570 insertions, 570 deletions
diff --git a/OpenSim/Grid/Framework/IGridServiceCore.cs b/OpenSim/Grid/Framework/IGridServiceCore.cs
index 894ea14..8843e83 100644
--- a/OpenSim/Grid/Framework/IGridServiceCore.cs
+++ b/OpenSim/Grid/Framework/IGridServiceCore.cs
@@ -1,40 +1,40 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the 12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using OpenSim.Framework.Servers; 29using OpenSim.Framework.Servers;
30 30
31namespace OpenSim.Grid.Framework 31namespace OpenSim.Grid.Framework
32{ 32{
33 public interface IGridServiceCore 33 public interface IGridServiceCore
34 { 34 {
35 T Get<T>(); 35 T Get<T>();
36 void RegisterInterface<T>(T iface); 36 void RegisterInterface<T>(T iface);
37 bool TryGet<T>(out T iface); 37 bool TryGet<T>(out T iface);
38 BaseHttpServer GetHttpServer(); 38 BaseHttpServer GetHttpServer();
39 } 39 }
40} 40}
diff --git a/OpenSim/Grid/Framework/IGridServiceModule.cs b/OpenSim/Grid/Framework/IGridServiceModule.cs
index b44bd40..97706d3 100644
--- a/OpenSim/Grid/Framework/IGridServiceModule.cs
+++ b/OpenSim/Grid/Framework/IGridServiceModule.cs
@@ -1,13 +1,13 @@
1using System; 1using System;
2using OpenSim.Framework.Servers; 2using OpenSim.Framework.Servers;
3 3
4namespace OpenSim.Grid.Framework 4namespace OpenSim.Grid.Framework
5{ 5{
6 public interface IGridServiceModule 6 public interface IGridServiceModule
7 { 7 {
8 void Close(); 8 void Close();
9 void Initialise(IGridServiceCore core); 9 void Initialise(IGridServiceCore core);
10 void PostInitialise(); 10 void PostInitialise();
11 void RegisterHandlers(BaseHttpServer httpServer); 11 void RegisterHandlers(BaseHttpServer httpServer);
12 } 12 }
13} 13}
diff --git a/OpenSim/Grid/Framework/IInterServiceUserService.cs b/OpenSim/Grid/Framework/IInterServiceUserService.cs
index fe037bd..ee7365a 100644
--- a/OpenSim/Grid/Framework/IInterServiceUserService.cs
+++ b/OpenSim/Grid/Framework/IInterServiceUserService.cs
@@ -1,35 +1,35 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the 12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29namespace OpenSim.Grid.Framework 29namespace OpenSim.Grid.Framework
30{ 30{
31 public interface IInterServiceUserService 31 public interface IInterServiceUserService
32 { 32 {
33 bool SendToUserServer(System.Collections.Hashtable request, string method); 33 bool SendToUserServer(System.Collections.Hashtable request, string method);
34 } 34 }
35} 35}
diff --git a/OpenSim/Grid/Framework/IMessageRegionLookup.cs b/OpenSim/Grid/Framework/IMessageRegionLookup.cs
index 5e49a40..461fe73 100644
--- a/OpenSim/Grid/Framework/IMessageRegionLookup.cs
+++ b/OpenSim/Grid/Framework/IMessageRegionLookup.cs
@@ -1,38 +1,38 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the 12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using OpenSim.Data; 29using OpenSim.Data;
30 30
31namespace OpenSim.Grid.Framework 31namespace OpenSim.Grid.Framework
32{ 32{
33 public interface IMessageRegionLookup 33 public interface IMessageRegionLookup
34 { 34 {
35 int ClearRegionCache(); 35 int ClearRegionCache();
36 RegionProfileData GetRegionInfo(ulong regionhandle); 36 RegionProfileData GetRegionInfo(ulong regionhandle);
37 } 37 }
38} 38}
diff --git a/OpenSim/Grid/Framework/IMessagingServerDiscovery.cs b/OpenSim/Grid/Framework/IMessagingServerDiscovery.cs
index 7995aba..c996f4f 100644
--- a/OpenSim/Grid/Framework/IMessagingServerDiscovery.cs
+++ b/OpenSim/Grid/Framework/IMessagingServerDiscovery.cs
@@ -1,40 +1,40 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the 12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using OpenSim.Framework.Servers; 30using OpenSim.Framework.Servers;
31 31
32namespace OpenSim.Grid.Framework 32namespace OpenSim.Grid.Framework
33{ 33{
34 public interface IMessagingServerDiscovery 34 public interface IMessagingServerDiscovery
35 { 35 {
36 List<MessageServerInfo> GetMessageServersList(); 36 List<MessageServerInfo> GetMessageServersList();
37 void RegisterMessageServer(MessageServerInfo m); 37 void RegisterMessageServer(MessageServerInfo m);
38 void DeRegisterMessageServer(MessageServerInfo m); 38 void DeRegisterMessageServer(MessageServerInfo m);
39 } 39 }
40} 40}
diff --git a/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs b/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs
index ea7649a..04d938b 100644
--- a/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs
+++ b/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs
@@ -1,186 +1,186 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using System.Timers; 34using System.Timers;
35using log4net; 35using log4net;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
37using OpenMetaverse; 37using OpenMetaverse;
38using OpenSim.Data; 38using OpenSim.Data;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Grid.Framework; 40using OpenSim.Grid.Framework;
41using Timer = System.Timers.Timer; 41using Timer = System.Timers.Timer;
42 42
43namespace OpenSim.Grid.MessagingServer.Modules 43namespace OpenSim.Grid.MessagingServer.Modules
44{ 44{
45 public class InterMessageUserServerModule : IInterServiceUserService 45 public class InterMessageUserServerModule : IInterServiceUserService
46 { 46 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 private MessageServerConfig m_cfg; 49 private MessageServerConfig m_cfg;
50 50
51 private IGridServiceCore m_messageCore; 51 private IGridServiceCore m_messageCore;
52 52
53 private Timer reconnectTimer = new Timer(300000); // 5 mins 53 private Timer reconnectTimer = new Timer(300000); // 5 mins
54 54
55 public InterMessageUserServerModule(MessageServerConfig config, IGridServiceCore messageCore) 55 public InterMessageUserServerModule(MessageServerConfig config, IGridServiceCore messageCore)
56 { 56 {
57 m_cfg = config; 57 m_cfg = config;
58 m_messageCore = messageCore; 58 m_messageCore = messageCore;
59 59
60 reconnectTimer.Elapsed += registerWithUserServer; 60 reconnectTimer.Elapsed += registerWithUserServer;
61 reconnectTimer.Start(); 61 reconnectTimer.Start();
62 } 62 }
63 63
64 public void Initialise() 64 public void Initialise()
65 { 65 {
66 m_messageCore.RegisterInterface<IInterServiceUserService>(this); 66 m_messageCore.RegisterInterface<IInterServiceUserService>(this);
67 } 67 }
68 68
69 public void PostInitialise() 69 public void PostInitialise()
70 { 70 {
71 71
72 } 72 }
73 73
74 public void RegisterHandlers() 74 public void RegisterHandlers()
75 { 75 {
76 //have these in separate method as some servers restart the http server and reregister all the handlers. 76 //have these in separate method as some servers restart the http server and reregister all the handlers.
77 77
78 } 78 }
79 79
80 public void registerWithUserServer(object sender, ElapsedEventArgs e) 80 public void registerWithUserServer(object sender, ElapsedEventArgs e)
81 { 81 {
82 registerWithUserServer(); 82 registerWithUserServer();
83 } 83 }
84 84
85 public bool registerWithUserServer() 85 public bool registerWithUserServer()
86 { 86 {
87 Hashtable UserParams = new Hashtable(); 87 Hashtable UserParams = new Hashtable();
88 // Login / Authentication 88 // Login / Authentication
89 89
90 if (m_cfg.HttpSSL) 90 if (m_cfg.HttpSSL)
91 { 91 {
92 UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 92 UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
93 } 93 }
94 else 94 else
95 { 95 {
96 UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 96 UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
97 } 97 }
98 98
99 UserParams["recvkey"] = m_cfg.UserRecvKey; 99 UserParams["recvkey"] = m_cfg.UserRecvKey;
100 UserParams["sendkey"] = m_cfg.UserRecvKey; 100 UserParams["sendkey"] = m_cfg.UserRecvKey;
101 101
102 // Package into an XMLRPC Request 102 // Package into an XMLRPC Request
103 ArrayList SendParams = new ArrayList(); 103 ArrayList SendParams = new ArrayList();
104 SendParams.Add(UserParams); 104 SendParams.Add(UserParams);
105 105
106 bool success = true; 106 bool success = true;
107 string[] servers = m_cfg.UserServerURL.Split(' '); 107 string[] servers = m_cfg.UserServerURL.Split(' ');
108 108
109 foreach (string srv in servers) 109 foreach (string srv in servers)
110 { 110 {
111 // Send Request 111 // Send Request
112 try 112 try
113 { 113 {
114 XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams); 114 XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams);
115 XmlRpcResponse UserResp = UserReq.Send(srv, 16000); 115 XmlRpcResponse UserResp = UserReq.Send(srv, 16000);
116 116
117 // Process Response 117 // Process Response
118 Hashtable GridRespData = (Hashtable)UserResp.Value; 118 Hashtable GridRespData = (Hashtable)UserResp.Value;
119 // if we got a response, we were successful 119 // if we got a response, we were successful
120 if (!GridRespData.ContainsKey("responsestring")) 120 if (!GridRespData.ContainsKey("responsestring"))
121 success = false; 121 success = false;
122 else 122 else
123 m_log.InfoFormat("[SERVER] Registered with {0}", srv); 123 m_log.InfoFormat("[SERVER] Registered with {0}", srv);
124 } 124 }
125 catch 125 catch
126 { 126 {
127 m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv); 127 m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv);
128 success = false; 128 success = false;
129 } 129 }
130 } 130 }
131 return success; 131 return success;
132 } 132 }
133 133
134 public bool deregisterWithUserServer() 134 public bool deregisterWithUserServer()
135 { 135 {
136 Hashtable request = new Hashtable(); 136 Hashtable request = new Hashtable();
137 137
138 return SendToUserServer(request, "deregister_messageserver"); 138 return SendToUserServer(request, "deregister_messageserver");
139 } 139 }
140 140
141 public bool SendToUserServer(Hashtable request, string method) 141 public bool SendToUserServer(Hashtable request, string method)
142 { 142 {
143 // Login / Authentication 143 // Login / Authentication
144 144
145 if (m_cfg.HttpSSL) 145 if (m_cfg.HttpSSL)
146 { 146 {
147 request["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 147 request["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
148 } 148 }
149 else 149 else
150 { 150 {
151 request["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 151 request["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
152 } 152 }
153 153
154 request["recvkey"] = m_cfg.UserRecvKey; 154 request["recvkey"] = m_cfg.UserRecvKey;
155 request["sendkey"] = m_cfg.UserRecvKey; 155 request["sendkey"] = m_cfg.UserRecvKey;
156 156
157 // Package into an XMLRPC Request 157 // Package into an XMLRPC Request
158 ArrayList SendParams = new ArrayList(); 158 ArrayList SendParams = new ArrayList();
159 SendParams.Add(request); 159 SendParams.Add(request);
160 160
161 bool success = true; 161 bool success = true;
162 string[] servers = m_cfg.UserServerURL.Split(' '); 162 string[] servers = m_cfg.UserServerURL.Split(' ');
163 163
164 // Send Request 164 // Send Request
165 foreach (string srv in servers) 165 foreach (string srv in servers)
166 { 166 {
167 try 167 try
168 { 168 {
169 XmlRpcRequest UserReq = new XmlRpcRequest(method, SendParams); 169 XmlRpcRequest UserReq = new XmlRpcRequest(method, SendParams);
170 XmlRpcResponse UserResp = UserReq.Send(m_cfg.UserServerURL, 16000); 170 XmlRpcResponse UserResp = UserReq.Send(m_cfg.UserServerURL, 16000);
171 // Process Response 171 // Process Response
172 Hashtable UserRespData = (Hashtable)UserResp.Value; 172 Hashtable UserRespData = (Hashtable)UserResp.Value;
173 // if we got a response, we were successful 173 // if we got a response, we were successful
174 if (!UserRespData.ContainsKey("responsestring")) 174 if (!UserRespData.ContainsKey("responsestring"))
175 success = false; 175 success = false;
176 } 176 }
177 catch 177 catch
178 { 178 {
179 m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv); 179 m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv);
180 success = false; 180 success = false;
181 } 181 }
182 } 182 }
183 return success; 183 return success;
184 } 184 }
185 } 185 }
186} 186}
diff --git a/OpenSim/Grid/UserServer.Modules/GridInfoServiceModule.cs b/OpenSim/Grid/UserServer.Modules/GridInfoServiceModule.cs
index e79e786..33b55b6 100644
--- a/OpenSim/Grid/UserServer.Modules/GridInfoServiceModule.cs
+++ b/OpenSim/Grid/UserServer.Modules/GridInfoServiceModule.cs
@@ -1,77 +1,77 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using log4net.Config; 33using log4net.Config;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications; 36using OpenSim.Framework.Communications;
37using OpenSim.Framework.Communications.Cache; 37using OpenSim.Framework.Communications.Cache;
38using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
39using OpenSim.Grid.Communications.OGS1; 39using OpenSim.Grid.Communications.OGS1;
40using OpenSim.Grid.Framework; 40using OpenSim.Grid.Framework;
41 41
42namespace OpenSim.Grid.UserServer.Modules 42namespace OpenSim.Grid.UserServer.Modules
43{ 43{
44 public class GridInfoServiceModule 44 public class GridInfoServiceModule
45 { 45 {
46 protected IGridServiceCore m_core; 46 protected IGridServiceCore m_core;
47 protected GridInfoService m_gridInfoService; 47 protected GridInfoService m_gridInfoService;
48 protected BaseHttpServer m_httpServer; 48 protected BaseHttpServer m_httpServer;
49 49
50 public GridInfoServiceModule() 50 public GridInfoServiceModule()
51 { 51 {
52 } 52 }
53 53
54 public void Initialise(IGridServiceCore core) 54 public void Initialise(IGridServiceCore core)
55 { 55 {
56 m_core = core; 56 m_core = core;
57 m_gridInfoService = new GridInfoService(); 57 m_gridInfoService = new GridInfoService();
58 } 58 }
59 59
60 public void PostInitialise() 60 public void PostInitialise()
61 { 61 {
62 62
63 } 63 }
64 64
65 public void RegisterHandlers(BaseHttpServer httpServer) 65 public void RegisterHandlers(BaseHttpServer httpServer)
66 { 66 {
67 m_httpServer = httpServer; 67 m_httpServer = httpServer;
68 m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", 68 m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info",
69 m_gridInfoService.RestGetGridInfoMethod)); 69 m_gridInfoService.RestGetGridInfoMethod));
70 m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); 70 m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod);
71 } 71 }
72 72
73 public void Close() 73 public void Close()
74 { 74 {
75 } 75 }
76 } 76 }
77} 77}
diff --git a/OpenSim/Grid/UserServer/UserServerEventDispatchModule.cs b/OpenSim/Grid/UserServer/UserServerEventDispatchModule.cs
index 2d3f414..9ff9cfc 100644
--- a/OpenSim/Grid/UserServer/UserServerEventDispatchModule.cs
+++ b/OpenSim/Grid/UserServer/UserServerEventDispatchModule.cs
@@ -1,141 +1,141 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using log4net.Config; 33using log4net.Config;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Data; 35using OpenSim.Data;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Communications; 37using OpenSim.Framework.Communications;
38using OpenSim.Framework.Communications.Cache; 38using OpenSim.Framework.Communications.Cache;
39using OpenSim.Framework.Console; 39using OpenSim.Framework.Console;
40using OpenSim.Framework.Servers; 40using OpenSim.Framework.Servers;
41using OpenSim.Framework.Statistics; 41using OpenSim.Framework.Statistics;
42using OpenSim.Grid.Communications.OGS1; 42using OpenSim.Grid.Communications.OGS1;
43using OpenSim.Grid.Framework; 43using OpenSim.Grid.Framework;
44using OpenSim.Grid.UserServer.Modules; 44using OpenSim.Grid.UserServer.Modules;
45 45
46namespace OpenSim.Grid.UserServer 46namespace OpenSim.Grid.UserServer
47{ 47{
48 //Do we actually need these event dispatchers? 48 //Do we actually need these event dispatchers?
49 //shouldn't the other modules just directly register event handlers to each other? 49 //shouldn't the other modules just directly register event handlers to each other?
50 public class UserServerEventDispatchModule 50 public class UserServerEventDispatchModule
51 { 51 {
52 protected UserManager m_userManager; 52 protected UserManager m_userManager;
53 protected MessageServersConnector m_messagesService; 53 protected MessageServersConnector m_messagesService;
54 protected UserLoginService m_loginService; 54 protected UserLoginService m_loginService;
55 55
56 public UserServerEventDispatchModule(UserManager userManager, MessageServersConnector messagesService, UserLoginService loginService) 56 public UserServerEventDispatchModule(UserManager userManager, MessageServersConnector messagesService, UserLoginService loginService)
57 { 57 {
58 m_userManager = userManager; 58 m_userManager = userManager;
59 m_messagesService = messagesService; 59 m_messagesService = messagesService;
60 m_loginService = loginService; 60 m_loginService = loginService;
61 } 61 }
62 62
63 public void Initialise(IGridServiceCore core) 63 public void Initialise(IGridServiceCore core)
64 { 64 {
65 } 65 }
66 66
67 public void PostInitialise() 67 public void PostInitialise()
68 { 68 {
69 m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; 69 m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation;
70 m_userManager.OnLogOffUser += NotifyMessageServersUserLoggOff; 70 m_userManager.OnLogOffUser += NotifyMessageServersUserLoggOff;
71 71
72 m_messagesService.OnAgentLocation += HandleAgentLocation; 72 m_messagesService.OnAgentLocation += HandleAgentLocation;
73 m_messagesService.OnAgentLeaving += HandleAgentLeaving; 73 m_messagesService.OnAgentLeaving += HandleAgentLeaving;
74 m_messagesService.OnRegionStartup += HandleRegionStartup; 74 m_messagesService.OnRegionStartup += HandleRegionStartup;
75 m_messagesService.OnRegionShutdown += HandleRegionShutdown; 75 m_messagesService.OnRegionShutdown += HandleRegionShutdown;
76 } 76 }
77 77
78 public void RegisterHandlers(BaseHttpServer httpServer) 78 public void RegisterHandlers(BaseHttpServer httpServer)
79 { 79 {
80 80
81 } 81 }
82 82
83 public void Close() 83 public void Close()
84 { 84 {
85 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; 85 m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation;
86 } 86 }
87 87
88 #region Event Handlers 88 #region Event Handlers
89 public void NotifyMessageServersUserLoggOff(UUID agentID) 89 public void NotifyMessageServersUserLoggOff(UUID agentID)
90 { 90 {
91 m_messagesService.TellMessageServersAboutUserLogoff(agentID); 91 m_messagesService.TellMessageServersAboutUserLogoff(agentID);
92 } 92 }
93 93
94 public void NotifyMessageServersUserLoggedInToLocation(UUID agentID, UUID sessionID, UUID RegionID, 94 public void NotifyMessageServersUserLoggedInToLocation(UUID agentID, UUID sessionID, UUID RegionID,
95 ulong regionhandle, float positionX, float positionY, 95 ulong regionhandle, float positionX, float positionY,
96 float positionZ, string firstname, string lastname) 96 float positionZ, string firstname, string lastname)
97 { 97 {
98 m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, positionX, 98 m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, positionX,
99 positionY, positionZ, firstname, lastname); 99 positionY, positionZ, firstname, lastname);
100 } 100 }
101 101
102 public void HandleAgentLocation(UUID agentID, UUID regionID, ulong regionHandle) 102 public void HandleAgentLocation(UUID agentID, UUID regionID, ulong regionHandle)
103 { 103 {
104 m_userManager.HandleAgentLocation(agentID, regionID, regionHandle); 104 m_userManager.HandleAgentLocation(agentID, regionID, regionHandle);
105 } 105 }
106 106
107 public void HandleAgentLeaving(UUID agentID, UUID regionID, ulong regionHandle) 107 public void HandleAgentLeaving(UUID agentID, UUID regionID, ulong regionHandle)
108 { 108 {
109 m_userManager.HandleAgentLeaving(agentID, regionID, regionHandle); 109 m_userManager.HandleAgentLeaving(agentID, regionID, regionHandle);
110 } 110 }
111 111
112 public void HandleRegionStartup(UUID regionID) 112 public void HandleRegionStartup(UUID regionID)
113 { 113 {
114 // This might seem strange, that we send this back to the 114 // This might seem strange, that we send this back to the
115 // server it came from. But there is method to the madness. 115 // server it came from. But there is method to the madness.
116 // There can be multiple user servers on the same database, 116 // There can be multiple user servers on the same database,
117 // and each can have multiple messaging servers. So, we send 117 // and each can have multiple messaging servers. So, we send
118 // it to all known user servers, who send it to all known 118 // it to all known user servers, who send it to all known
119 // message servers. That way, we should be able to finally 119 // message servers. That way, we should be able to finally
120 // update presence to all regions and thereby all friends 120 // update presence to all regions and thereby all friends
121 // 121 //
122 m_userManager.HandleRegionStartup(regionID); 122 m_userManager.HandleRegionStartup(regionID);
123 m_messagesService.TellMessageServersAboutRegionShutdown(regionID); 123 m_messagesService.TellMessageServersAboutRegionShutdown(regionID);
124 } 124 }
125 125
126 public void HandleRegionShutdown(UUID regionID) 126 public void HandleRegionShutdown(UUID regionID)
127 { 127 {
128 // This might seem strange, that we send this back to the 128 // This might seem strange, that we send this back to the
129 // server it came from. But there is method to the madness. 129 // server it came from. But there is method to the madness.
130 // There can be multiple user servers on the same database, 130 // There can be multiple user servers on the same database,
131 // and each can have multiple messaging servers. So, we send 131 // and each can have multiple messaging servers. So, we send
132 // it to all known user servers, who send it to all known 132 // it to all known user servers, who send it to all known
133 // message servers. That way, we should be able to finally 133 // message servers. That way, we should be able to finally
134 // update presence to all regions and thereby all friends 134 // update presence to all regions and thereby all friends
135 // 135 //
136 m_userManager.HandleRegionShutdown(regionID); 136 m_userManager.HandleRegionShutdown(regionID);
137 m_messagesService.TellMessageServersAboutRegionShutdown(regionID); 137 m_messagesService.TellMessageServersAboutRegionShutdown(regionID);
138 } 138 }
139 #endregion 139 #endregion
140 } 140 }
141} 141}