Remove all references to HttpServer from CommsManager (all incarnations)

Change all uses of the HttpServer properties to use the new singleton
trunk
Melanie Thielker 2009-07-10 02:22:26 +00:00
parent 7b457805a3
commit c310fb11f4
39 changed files with 83 additions and 113 deletions

View File

@ -168,8 +168,8 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
{
m_commsManager
= new CommunicationsLocal(
m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache,
libraryRootFolder, false);
m_openSim.ConfigurationSettings, m_openSim.NetServersInfo,
libraryRootFolder);
CreateGridInfoService();
}
@ -177,7 +177,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolder)
{
m_commsManager
= new CommunicationsOGS1(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, libraryRootFolder);
= new CommunicationsOGS1(m_openSim.NetServersInfo, libraryRootFolder);
m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim));
@ -206,8 +206,8 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
{
m_commsManager
= new HGCommunicationsGridMode(
m_openSim.NetServersInfo, m_httpServer,
m_openSim.AssetCache, m_openSim.SceneManager, libraryRootFolder);
m_openSim.NetServersInfo,
m_openSim.SceneManager, libraryRootFolder);
HGServices = ((HGCommunicationsGridMode) m_commsManager).HGServices;

View File

@ -143,8 +143,8 @@ namespace OpenSim.Client.Linden
protected void AddHttpHandlers()
{
//we will add our handlers to the first scene we received, as all scenes share a http server. But will this ever change?
m_firstScene.CommsManager.HttpServer.AddXmlRPCHandler("expect_user", ExpectUser);
m_firstScene.CommsManager.HttpServer.AddXmlRPCHandler("logoff_user", LogOffUser);
MainServer.Instance.AddXmlRPCHandler("expect_user", ExpectUser);
MainServer.Instance.AddXmlRPCHandler("logoff_user", LogOffUser);
}
protected void AddScene(Scene scene)

View File

@ -130,7 +130,7 @@ namespace OpenSim.Client.Linden
LibraryRootFolder rootFolder
= m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;
IHttpServer httpServer = m_firstScene.CommsManager.HttpServer;
IHttpServer httpServer = MainServer.Instance;
//TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
m_loginService

View File

@ -20,8 +20,7 @@
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
@ -31,6 +30,7 @@ using System.Text;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Client.VWoHTTP.ClientStack;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Interfaces;
@ -57,7 +57,7 @@ namespace OpenSim.Client.VWoHTTP
m_scenes.Add(scene);
m_httpd = scene.CommsManager.HttpServer;
m_httpd = MainServer.Instance;
}
public void PostInitialise()

View File

@ -29,12 +29,11 @@ using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers.HttpServer;
namespace OpenSim.Framework.Communications
{
/// <summary>
/// This class manages references to OpenSim non-region services (asset, inventory, user, etc.)
/// This class manages references to OpenSim non-region services (inventory, user, etc.)
/// </summary>
///
/// TODO: Service retrieval needs to be managed via plugin and interfaces requests, as happens for region
@ -99,28 +98,15 @@ namespace OpenSim.Framework.Communications
}
protected IUserAdminService m_userAdminService;
/// <value>
/// OpenSimulator's built in HTTP server
/// </value>
public IHttpServer HttpServer
{
get { return m_httpServer; }
}
protected IHttpServer m_httpServer;
/// <summary>
/// Constructor
/// </summary>
/// <param name="serversInfo"></param>
/// <param name="httpServer"></param>
/// <param name="assetCache"></param>
/// <param name="dumpAssetsToFile"></param>
public CommunicationsManager(NetworkServersInfo serversInfo, IHttpServer httpServer, IAssetCache assetCache,
bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder)
public CommunicationsManager(NetworkServersInfo serversInfo,
LibraryRootFolder libraryRootFolder)
{
m_networkServersInfo = serversInfo;
m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder);
m_httpServer = httpServer;
}
#region Inventory

View File

@ -32,7 +32,7 @@ namespace OpenSim.Grid.UserServer
public class UserServerCommsManager : CommunicationsManager
{
public UserServerCommsManager(IInterServiceInventoryServices interServiceInventoryService)
: base(null, null, null, false, null)
: base(null, null)
{
m_interServiceInventoryService = interServiceInventoryService;
}

View File

@ -391,7 +391,7 @@ namespace OpenSim
scene.LoadPrimsFromStorage(regionInfo.originRegionID);
// TODO : Try setting resource for region xstats here on scene
scene.CommsManager.HttpServer.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
try
{

View File

@ -50,12 +50,12 @@ namespace OpenSim.Region.Communications.Hypergrid
}
public HGCommunicationsGridMode(
NetworkServersInfo serversInfo, BaseHttpServer httpServer,
IAssetCache assetCache, SceneManager sman, LibraryRootFolder libraryRootFolder)
: base(serversInfo, httpServer, assetCache, false, libraryRootFolder)
NetworkServersInfo serversInfo,
SceneManager sman, LibraryRootFolder libraryRootFolder)
: base(serversInfo, libraryRootFolder)
{
// From constructor at CommunicationsOGS1
HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, httpServer, assetCache, sman, m_userProfileCacheService);
HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, sman, m_userProfileCacheService);
m_gridService = gridInterComms;
m_osw = gridInterComms;

View File

@ -48,7 +48,7 @@ namespace OpenSim.Region.Communications.Hypergrid
HGGridServices gridService,
LibraryRootFolder libraryRootFolder,
bool dumpAssetsToFile)
: base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder)
: base(serversInfo, libraryRootFolder)
{
LocalUserServices localUserService =
new LocalUserServices(

View File

@ -63,7 +63,6 @@ namespace OpenSim.Region.Communications.Hypergrid
public BaseHttpServer httpListener;
public NetworkServersInfo serversInfo;
public BaseHttpServer httpServer;
protected List<RegionInfo> m_regionsOnInstance = new List<RegionInfo>();
@ -76,7 +75,6 @@ namespace OpenSim.Region.Communications.Hypergrid
// This is key-ed on agent ID
protected Dictionary<UUID, RegionInfo> m_knownRegions = new Dictionary<UUID, RegionInfo>();
protected IAssetCache m_assetcache;
protected UserProfileCacheService m_userProfileCache;
protected SceneManager m_sceneman;
@ -112,18 +110,15 @@ namespace OpenSim.Region.Communications.Hypergrid
/// Contructor. Adds "expect_hg_user" and "check" xmlrpc method handlers
/// </summary>
/// <param name="servers_info"></param>
/// <param name="httpServe"></param>
public HGGridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman)
public HGGridServices(NetworkServersInfo servers_info, SceneManager sman)
{
serversInfo = servers_info;
httpServer = httpServe;
m_assetcache = asscache;
m_sceneman = sman;
random = new Random();
httpServer.AddXmlRPCHandler("link_region", LinkRegionRequest);
httpServer.AddXmlRPCHandler("expect_hg_user", ExpectHGUser);
MainServer.Instance.AddXmlRPCHandler("link_region", LinkRegionRequest);
MainServer.Instance.AddXmlRPCHandler("expect_hg_user", ExpectHGUser);
HGNetworkServersInfo.Init(servers_info.AssetURL, servers_info.InventoryURL, servers_info.UserURL);
}

View File

@ -65,11 +65,11 @@ namespace OpenSim.Region.Communications.Hypergrid
set { m_remoteBackend.RegionLoginsEnabled = value; }
}
public HGGridServicesGridMode(NetworkServersInfo servers_info, BaseHttpServer httpServe,
IAssetCache asscache, SceneManager sman, UserProfileCacheService userv)
: base(servers_info, httpServe, asscache, sman)
public HGGridServicesGridMode(NetworkServersInfo servers_info,
SceneManager sman, UserProfileCacheService userv)
: base(servers_info, sman)
{
m_remoteBackend = new OGS1GridServices(servers_info, httpServe);
m_remoteBackend = new OGS1GridServices(servers_info);
m_userProfileCache = userv;
}

View File

@ -77,12 +77,12 @@ namespace OpenSim.Region.Communications.Hypergrid
public HGGridServicesStandalone(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman)
: base(servers_info, httpServe, asscache, sman)
: base(servers_info, sman)
{
//Respond to Grid Services requests
httpServer.AddXmlRPCHandler("logoff_user", LogOffUser);
httpServer.AddXmlRPCHandler("check", PingCheckReply);
httpServer.AddXmlRPCHandler("land_data", LandData);
MainServer.Instance.AddXmlRPCHandler("logoff_user", LogOffUser);
MainServer.Instance.AddXmlRPCHandler("check", PingCheckReply);
MainServer.Instance.AddXmlRPCHandler("land_data", LandData);
}

View File

@ -31,7 +31,6 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Osp;
using OpenSim.Framework.Servers.HttpServer;
namespace OpenSim.Region.Communications.Local
{
@ -40,11 +39,8 @@ namespace OpenSim.Region.Communications.Local
public CommunicationsLocal(
ConfigSettings configSettings,
NetworkServersInfo serversInfo,
BaseHttpServer httpServer,
IAssetCache assetCache,
LibraryRootFolder libraryRootFolder,
bool dumpAssetsToFile)
: base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder)
LibraryRootFolder libraryRootFolder)
: base(serversInfo, libraryRootFolder)
{
LocalInventoryService inventoryService = new LocalInventoryService();
List<IInventoryDataPlugin> plugins

View File

@ -35,11 +35,11 @@ namespace OpenSim.Region.Communications.OGS1
public class CommunicationsOGS1 : CommunicationsManager
{
public CommunicationsOGS1(
NetworkServersInfo serversInfo, BaseHttpServer httpServer,
IAssetCache assetCache, LibraryRootFolder libraryRootFolder)
: base(serversInfo, httpServer, assetCache, false, libraryRootFolder)
NetworkServersInfo serversInfo,
LibraryRootFolder libraryRootFolder)
: base(serversInfo, libraryRootFolder)
{
OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer);
OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo);
m_gridService = gridInterComms;
if (serversInfo.secureInventoryServer)

View File

@ -59,7 +59,6 @@ namespace OpenSim.Region.Communications.OGS1
public BaseHttpServer httpListener;
public NetworkServersInfo serversInfo;
public BaseHttpServer httpServer;
public string gdebugRegionName
{
@ -85,19 +84,12 @@ namespace OpenSim.Region.Communications.OGS1
/// </summary>
/// <param name="servers_info"></param>
/// <param name="httpServe"></param>
public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe)
public OGS1GridServices(NetworkServersInfo servers_info)
{
serversInfo = servers_info;
httpServer = httpServe;
//Respond to Grid Services requests
// httpServer.AddXmlRPCHandler("expect_user", ExpectUser);
// httpServer.AddXmlRPCHandler("logoff_user", LogOffUser);
httpServer.AddXmlRPCHandler("check", PingCheckReply);
// Retired into the new service connectors, 6/14/09
//httpServer.AddXmlRPCHandler("land_data", LandData);
MainServer.Instance.AddXmlRPCHandler("check", PingCheckReply);
}
// see IGridServices

View File

@ -103,8 +103,8 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
Caps caps
= new Caps(
m_scene.AssetService, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName,
m_scene.CommsManager.HttpServer.Port,
m_scene.AssetService, MainServer.Instance, m_scene.RegionInfo.ExternalHostName,
MainServer.Instance.Port,
capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName);
caps.RegisterHandlers();

View File

@ -117,8 +117,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
{
if (m_scenes.Count == 0)
{
scene.CommsManager.HttpServer.AddXmlRPCHandler("presence_update_bulk", processPresenceUpdateBulk);
scene.CommsManager.HttpServer.AddXmlRPCHandler("terminate_friend", processTerminateFriend);
MainServer.Instance.AddXmlRPCHandler("presence_update_bulk", processPresenceUpdateBulk);
MainServer.Instance.AddXmlRPCHandler("terminate_friend", processTerminateFriend);
m_friendLists.DefaultTTL = new TimeSpan(1, 0, 0); // store entries for one hour max
m_initialScene = scene;
}

View File

@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{
if (m_Scenes.Count == 0)
{
scene.CommsManager.HttpServer.AddXmlRPCHandler(
MainServer.Instance.AddXmlRPCHandler(
"grid_instant_message", processXMLRPCGridInstantMessage);
}

View File

@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
foreach (UUID ky in removeitems)
{
m_AvatarQueueUUIDMapping.Remove(ky);
m_scene.CommsManager.HttpServer.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
MainServer.Instance.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
}
}
@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
}));
// This will persist this beyond the expiry of the caps handlers
m_scene.CommsManager.HttpServer.AddHTTPHandler(
MainServer.Instance.AddHTTPHandler(
capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePath2);
Random rnd = new Random(Environment.TickCount);

View File

@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Framework.Services
// IAssetDataPlugin m_assetProvider
// = ((AssetServerBase)m_scene.CommsManager.AssetCache.AssetServer).AssetProviderPlugin;
IHttpServer httpServer = m_scene.CommsManager.HttpServer;
IHttpServer httpServer = MainServer.Instance;
httpServer.AddXmlRPCHandler("simulator_data_request", XmlRpcSimulatorDataRequestMethod);
//m_httpServer.AddXmlRPCHandler("map_block", XmlRpcMapBlockMethod);
//m_httpServer.AddXmlRPCHandler("search_for_region_by_name", XmlRpcSearchForRegionMethod);

View File

@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
//TODO: fix casting.
LibraryRootFolder rootFolder = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;
IHttpServer httpServer = m_firstScene.CommsManager.HttpServer;
IHttpServer httpServer = MainServer.Instance;
//TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
m_loginService

View File

@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
if (m_settings.Configs["Startup"].GetBoolean("gridmode", false))
{
m_com = m_scenes[0].CommsManager;
m_com.HttpServer.AddXmlRPCHandler("grid_message", GridWideMessage);
MainServer.Instance.AddXmlRPCHandler("grid_message", GridWideMessage);
}
}

View File

@ -143,8 +143,8 @@ namespace OpenSim.Region.CoreModules.InterGrid
{
if (m_scene.Count == 0)
{
scene.CommsManager.HttpServer.AddLLSDHandler("/agent/", ProcessAgentDomainMessage);
scene.CommsManager.HttpServer.AddLLSDHandler("/", ProcessRegionDomainSeed);
MainServer.Instance.AddLLSDHandler("/agent/", ProcessAgentDomainMessage);
MainServer.Instance.AddLLSDHandler("/", ProcessRegionDomainSeed);
try
{
ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation;
@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
// a zero length region name would conflict with are base region seed cap
if (!SceneListDuplicateCheck(scene.RegionInfo.RegionName) && scene.RegionInfo.RegionName.ToLower() != "agent" && scene.RegionInfo.RegionName.Length > 0)
{
scene.CommsManager.HttpServer.AddLLSDHandler(
MainServer.Instance.AddLLSDHandler(
"/" + HttpUtility.UrlPathEncode(scene.RegionInfo.RegionName.ToLower()),
ProcessRegionDomainSeed);
}

View File

@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
{
// There can only be one
//
m_HttpServer = scene.CommsManager.HttpServer;
m_HttpServer = MainServer.Instance;
}
scene.RegisterModuleInterface<IUrlModule>(this);

View File

@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
m_log.Info("[RegionAssetService]: Starting...");
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer };
Object[] args = new Object[] { m_Config, MainServer.Instance };
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:AssetServiceConnector", args);
}

View File

@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication
if (!m_Registered)
{
m_Registered = true;
new HGAuthServiceInConnector(m_Config, scene.CommsManager.HttpServer);
new HGAuthServiceInConnector(m_Config, MainServer.Instance);
//Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer };
//ServerUtils.LoadPlugin<IAuthenticationService>("OpenSim.Server.Handlers.dll:HGAuthServiceInConnector", args);

View File

@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
m_log.Info("[RegionInventoryService]: Starting...");
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer };
Object[] args = new Object[] { m_Config, MainServer.Instance };
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:InventoryServiceInConnector", args);
}

View File

@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
if (!m_Registered)
{
m_Registered = true;
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, this, scene };
Object[] args = new Object[] { m_Config, MainServer.Instance, this, scene };
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:LandServiceInConnector", args);
}

View File

@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour
if (!m_Registered)
{
m_Registered = true;
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, this, scene };
Object[] args = new Object[] { m_Config, MainServer.Instance, this, scene };
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:NeighbourServiceInConnector", args);
}

View File

@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation
m_log.Info("[SIM SERVICE]: Starting...");
Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, scene };
Object[] args = new Object[] { m_Config, MainServer.Instance, scene };
ServerUtils.LoadPlugin<IServiceConnector>("OpenSim.Server.Handlers.dll:SimulationServiceInConnector", args);
}

View File

@ -128,8 +128,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
protected virtual void AddHTTPHandlers()
{
m_aScene.CommsManager.HttpServer.AddHTTPHandler("/agent/", AgentHandler);
m_aScene.CommsManager.HttpServer.AddHTTPHandler("/object/", ObjectHandler);
MainServer.Instance.AddHTTPHandler("/agent/", AgentHandler);
MainServer.Instance.AddHTTPHandler("/object/", ObjectHandler);
}
#endregion /* IRegionModule */

View File

@ -144,8 +144,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
regionimage = regionimage.Replace("-", "");
m_log.Info("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage);
m_scene.CommsManager.HttpServer.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
m_scene.CommsManager.HttpServer.AddLLSDHandler(
MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
MainServer.Instance.AddLLSDHandler(
"/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(), HandleRemoteMapItemRequest);
m_scene.EventManager.OnRegisterCaps += OnRegisterCaps;
@ -166,9 +166,9 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
regionimage = regionimage.Replace("-", "");
m_scene.CommsManager.HttpServer.RemoveLLSDHandler("/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(),
MainServer.Instance.RemoveLLSDHandler("/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(),
HandleRemoteMapItemRequest);
m_scene.CommsManager.HttpServer.RemoveHTTPHandler("", regionimage);
MainServer.Instance.RemoveHTTPHandler("", regionimage);
}
public void OnRegisterCaps(UUID agentID, Caps caps)

View File

@ -31,6 +31,7 @@ using System.Reflection;
using System.Xml;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
@ -53,7 +54,7 @@ namespace OpenSim.Region.DataSnapshot
m_externalData = externalData;
//Register HTTP handler
if (m_scene.CommsManager.HttpServer.AddHTTPHandler("collector", OnGetSnapshot))
if (MainServer.Instance.AddHTTPHandler("collector", OnGetSnapshot))
{
m_log.Info("[DATASNAPSHOT]: Set up snapshot service");
}

View File

@ -90,7 +90,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
{
m_log.InfoFormat("[IRC-Bridge] Connecting region {0}", scene.RegionInfo.RegionName);
if (!String.IsNullOrEmpty(m_password))
scene.CommsManager.HttpServer.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false);
MainServer.Instance.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false);
m_region = new RegionState(scene, m_config);
lock (m_regions) m_regions.Add(m_region);
m_region.Open();
@ -121,7 +121,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
return;
if (!String.IsNullOrEmpty(m_password))
scene.CommsManager.HttpServer.RemoveXmlRPCHandler("irc_admin");
MainServer.Instance.RemoveXmlRPCHandler("irc_admin");
m_region.Close();

View File

@ -144,7 +144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
{
if (!m_enabled) return;
scene.CommsManager.HttpServer.AddXmlRPCHandler("concierge_update_welcome", XmlRpcUpdateWelcomeMethod, false);
MainServer.Instance.AddXmlRPCHandler("concierge_update_welcome", XmlRpcUpdateWelcomeMethod, false);
lock (m_syncy)
{
@ -176,7 +176,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
{
if (!m_enabled) return;
scene.CommsManager.HttpServer.RemoveXmlRPCHandler("concierge_update_welcome");
MainServer.Instance.RemoveXmlRPCHandler("concierge_update_welcome");
lock (m_syncy)
{

View File

@ -170,31 +170,31 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
// - signout: viv_signout.php
if (UseProxy)
{
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/", m_freeSwitchAPIPrefix),
ForwardProxyRequest);
}
else
{
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix),
FreeSwitchSLVoiceGetPreloginHTTPHandler);
// RestStreamHandler h = new
// RestStreamHandler("GET",
// String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceGetPreloginHTTPHandler);
// scene.CommsManager.HttpServer.AddStreamHandler(h);
// MainServer.Instance.AddStreamHandler(h);
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_signin.php", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_signin.php", m_freeSwitchAPIPrefix),
FreeSwitchSLVoiceSigninHTTPHandler);
// set up http request handlers to provide
// on-demand FreeSwitch configuration to
// FreeSwitch's mod_curl_xml
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix),
FreeSwitchConfigHTTPHandler);
scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix),
MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix),
FreeSwitchSLVoiceBuddyHTTPHandler);
}

View File

@ -124,7 +124,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
if (m_enabled)
{
scene.RegisterModuleInterface<IMoneyModule>(this);
IHttpServer httpServer = scene.CommsManager.HttpServer;
IHttpServer httpServer = MainServer.Instance;
lock (m_scenel)
{

View File

@ -127,8 +127,8 @@ namespace OpenSim.Region.UserStatistics
////
scene.CommsManager.HttpServer.AddHTTPHandler("/SStats/", HandleStatsRequest);
scene.CommsManager.HttpServer.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest);
MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest);
MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest);
}
m_scene.Add(scene);
@ -236,7 +236,7 @@ namespace OpenSim.Region.UserStatistics
}
else
{
strOut = m_scene[0].CommsManager.HttpServer.GetHTTP404("");
strOut = MainServer.Instance.GetHTTP404("");
}

View File

@ -55,7 +55,7 @@ namespace OpenSim.Tests.Common.Mock
}
public TestCommunicationsManager(NetworkServersInfo serversInfo)
: base(serversInfo, new BaseHttpServer(666), null, false, null)
: base(serversInfo, null)
{
LocalInventoryService lis = new LocalInventoryService();
m_inventoryDataPlugin = new TestInventoryDataPlugin();