aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Avatar/AvatarServerConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Handlers/Avatar/AvatarServerConnector.cs (renamed from OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs)43
1 files changed, 25 insertions, 18 deletions
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerConnector.cs
index 94e4ed2..9a57cd9 100644
--- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
+++ b/OpenSim/Server/Handlers/Avatar/AvatarServerConnector.cs
@@ -25,30 +25,37 @@
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 OpenSim.Framework; 28using System;
29using OpenSim.Framework.Communications; 29using Nini.Config;
30using OpenSim.Framework.Communications.Cache; 30using OpenSim.Server.Base;
31using OpenSim.Services.Interfaces;
31using OpenSim.Framework.Servers.HttpServer; 32using OpenSim.Framework.Servers.HttpServer;
33using OpenSim.Server.Handlers.Base;
32 34
33namespace OpenSim.Region.Communications.OGS1 35namespace OpenSim.Server.Handlers.Avatar
34{ 36{
35 public class CommunicationsOGS1 : CommunicationsManager 37 public class AvatarServiceConnector : ServiceConnector
36 { 38 {
37 public CommunicationsOGS1( 39 private IAvatarService m_AvatarService;
38 NetworkServersInfo serversInfo, 40 private string m_ConfigName = "AvatarService";
39 LibraryRootFolder libraryRootFolder) 41
40 : base(serversInfo, libraryRootFolder) 42 public AvatarServiceConnector(IConfigSource config, IHttpServer server, string configName) :
43 base(config, server, configName)
41 { 44 {
45 IConfig serverConfig = config.Configs[m_ConfigName];
46 if (serverConfig == null)
47 throw new Exception(String.Format("No section {0} in config file", m_ConfigName));
42 48
43 // This plugin arrangement could eventually be configurable rather than hardcoded here. 49 string avatarService = serverConfig.GetString("LocalServiceModule",
44 OGS1UserServices userServices = new OGS1UserServices(this); 50 String.Empty);
45 userServices.AddPlugin(new TemporaryUserProfilePlugin()); 51
46 userServices.AddPlugin(new OGS1UserDataPlugin(this)); 52 if (avatarService == String.Empty)
47 53 throw new Exception("No LocalServiceModule in config file");
48 m_userService = userServices;
49 m_messageService = userServices;
50 m_avatarService = (IAvatarService)m_userService;
51 }
52 54
55 Object[] args = new Object[] { config };
56 m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args);
57
58 server.AddStreamHandler(new AvatarServerPostHandler(m_AvatarService));
59 }
53 } 60 }
54} 61}