aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs53
1 files changed, 53 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
new file mode 100644
index 0000000..80b22b0
--- /dev/null
+++ b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
@@ -0,0 +1,53 @@
1using System;
2using Nini.Config;
3using OpenSim.Server.Base;
4using OpenSim.Services.Interfaces;
5using OpenSim.Framework;
6using OpenSim.Framework.Servers.HttpServer;
7using OpenSim.Server.Handlers.Base;
8
9namespace OpenSim.Server.Handlers.Simulation
10{
11 public class SimulationServiceInConnector : ServiceConnector
12 {
13 private ISimulationService m_SimulationService;
14 private IAuthenticationService m_AuthenticationService;
15
16 public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) :
17 base(config, server)
18 {
19 IConfig serverConfig = config.Configs["SimulationService"];
20 if (serverConfig == null)
21 throw new Exception("No section 'SimulationService' in config file");
22
23 bool authentication = serverConfig.GetBoolean("RequireAuthentication", false);
24
25 if (authentication)
26 m_AuthenticationService = scene.RequestModuleInterface<IAuthenticationService>();
27
28 bool foreignGuests = serverConfig.GetBoolean("AllowForeignGuests", false);
29
30 //string simService = serverConfig.GetString("LocalServiceModule",
31 // String.Empty);
32
33 //if (simService == String.Empty)
34 // throw new Exception("No SimulationService in config file");
35
36 //Object[] args = new Object[] { config };
37 m_SimulationService = scene.RequestModuleInterface<ISimulationService>();
38 //ServerUtils.LoadPlugin<ISimulationService>(simService, args);
39 if (m_SimulationService == null)
40 throw new Exception("No Local ISimulationService Module");
41
42
43
44 //System.Console.WriteLine("XXXXXXXXXXXXXXXXXXX m_AssetSetvice == null? " + ((m_AssetService == null) ? "yes" : "no"));
45 server.AddStreamHandler(new AgentGetHandler(m_SimulationService, m_AuthenticationService));
46 server.AddStreamHandler(new AgentPostHandler(m_SimulationService, m_AuthenticationService, foreignGuests));
47 server.AddStreamHandler(new AgentPutHandler(m_SimulationService, m_AuthenticationService));
48 server.AddStreamHandler(new AgentDeleteHandler(m_SimulationService, m_AuthenticationService));
49 //server.AddStreamHandler(new ObjectPostHandler(m_SimulationService, authentication));
50 //server.AddStreamHandler(new NeighborPostHandler(m_SimulationService, authentication));
51 }
52 }
53}