aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
diff options
context:
space:
mode:
authordiva2009-05-25 20:30:24 +0000
committerdiva2009-05-25 20:30:24 +0000
commitcb704ecde19c512bfa4fc0b317d37fec63e76713 (patch)
tree1960e54ce2312b95f030009c335b5211322ef60d /OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
parent* reseparate inventory item creator id and creator uuid (diff)
downloadopensim-SC-cb704ecde19c512bfa4fc0b317d37fec63e76713.zip
opensim-SC-cb704ecde19c512bfa4fc0b317d37fec63e76713.tar.gz
opensim-SC-cb704ecde19c512bfa4fc0b317d37fec63e76713.tar.bz2
opensim-SC-cb704ecde19c512bfa4fc0b317d37fec63e76713.tar.xz
Beginning of refactoring RESTComms/LocalComms in the new style of services and connectors. This commit has the beginning of the In connector, not the Out. Nothing of this is finished yet, and it doesn't run. But it should compile ok.
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}