30 using OpenSim.Framework.Servers.HttpServer;
31 using OpenSim.Server.Base;
32 using OpenSim.Server.Handlers.Base;
33 using OpenSim.Services.Interfaces;
36 namespace OpenSim.Capabilities.Handlers
41 private string m_ConfigName =
"CapsService";
44 base(config, server, configName)
46 if (configName != String.Empty)
47 m_ConfigName = configName;
49 IConfig serverConfig = config.Configs[m_ConfigName];
50 if (serverConfig == null)
51 throw new Exception(String.Format(
"No section '{0}' in config file", m_ConfigName));
53 string assetService = serverConfig.GetString(
"AssetService", String.Empty);
55 if (assetService == String.Empty)
56 throw new Exception(
"No AssetService in config file");
58 Object[] args =
new Object[] { config };
62 if (m_AssetService == null)
63 throw new Exception(String.Format(
"Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName));
65 string rurl = serverConfig.GetString(
"GetMeshRedirectURL");
71 "/CAPS/" + UUID.Random(),
72 httpMethod => gmeshHandler.ProcessGetMesh(httpMethod, UUID.Zero, null),
75 server.AddStreamHandler(reqHandler); ;
GetMeshServerConnector(IConfigSource config, IHttpServer server, string configName)
Interface to OpenSimulator's built in HTTP server. Use this to register handlers (http, llsd, xmlrpc, etc.) for given URLs.