diff options
author | Melanie Thielker | 2009-07-10 02:22:26 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-07-10 02:22:26 +0000 |
commit | c310fb11f492419de60b4bf8e5bb234e4589b336 (patch) | |
tree | a7bccfad7cde51ec830fdad59d5729091b2e69ae /OpenSim/Region/Communications | |
parent | Create a MainServer static class to access the regions server's HTTP server (diff) | |
download | opensim-SC-c310fb11f492419de60b4bf8e5bb234e4589b336.zip opensim-SC-c310fb11f492419de60b4bf8e5bb234e4589b336.tar.gz opensim-SC-c310fb11f492419de60b4bf8e5bb234e4589b336.tar.bz2 opensim-SC-c310fb11f492419de60b4bf8e5bb234e4589b336.tar.xz |
Remove all references to HttpServer from CommsManager (all incarnations)
Change all uses of the HttpServer properties to use the new singleton
Diffstat (limited to 'OpenSim/Region/Communications')
8 files changed, 24 insertions, 41 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs index 6767c32..0e7ab9b 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs | |||
@@ -50,12 +50,12 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
50 | } | 50 | } |
51 | 51 | ||
52 | public HGCommunicationsGridMode( | 52 | public HGCommunicationsGridMode( |
53 | NetworkServersInfo serversInfo, BaseHttpServer httpServer, | 53 | NetworkServersInfo serversInfo, |
54 | IAssetCache assetCache, SceneManager sman, LibraryRootFolder libraryRootFolder) | 54 | SceneManager sman, LibraryRootFolder libraryRootFolder) |
55 | : base(serversInfo, httpServer, assetCache, false, libraryRootFolder) | 55 | : base(serversInfo, libraryRootFolder) |
56 | { | 56 | { |
57 | // From constructor at CommunicationsOGS1 | 57 | // From constructor at CommunicationsOGS1 |
58 | HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, httpServer, assetCache, sman, m_userProfileCacheService); | 58 | HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, sman, m_userProfileCacheService); |
59 | m_gridService = gridInterComms; | 59 | m_gridService = gridInterComms; |
60 | m_osw = gridInterComms; | 60 | m_osw = gridInterComms; |
61 | 61 | ||
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs index f9c8075..3ea987c 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
48 | HGGridServices gridService, | 48 | HGGridServices gridService, |
49 | LibraryRootFolder libraryRootFolder, | 49 | LibraryRootFolder libraryRootFolder, |
50 | bool dumpAssetsToFile) | 50 | bool dumpAssetsToFile) |
51 | : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder) | 51 | : base(serversInfo, libraryRootFolder) |
52 | { | 52 | { |
53 | LocalUserServices localUserService = | 53 | LocalUserServices localUserService = |
54 | new LocalUserServices( | 54 | new LocalUserServices( |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs index 58711e5..54cde0f 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs | |||
@@ -63,7 +63,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
63 | 63 | ||
64 | public BaseHttpServer httpListener; | 64 | public BaseHttpServer httpListener; |
65 | public NetworkServersInfo serversInfo; | 65 | public NetworkServersInfo serversInfo; |
66 | public BaseHttpServer httpServer; | ||
67 | 66 | ||
68 | protected List<RegionInfo> m_regionsOnInstance = new List<RegionInfo>(); | 67 | protected List<RegionInfo> m_regionsOnInstance = new List<RegionInfo>(); |
69 | 68 | ||
@@ -76,7 +75,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
76 | // This is key-ed on agent ID | 75 | // This is key-ed on agent ID |
77 | protected Dictionary<UUID, RegionInfo> m_knownRegions = new Dictionary<UUID, RegionInfo>(); | 76 | protected Dictionary<UUID, RegionInfo> m_knownRegions = new Dictionary<UUID, RegionInfo>(); |
78 | 77 | ||
79 | protected IAssetCache m_assetcache; | ||
80 | protected UserProfileCacheService m_userProfileCache; | 78 | protected UserProfileCacheService m_userProfileCache; |
81 | protected SceneManager m_sceneman; | 79 | protected SceneManager m_sceneman; |
82 | 80 | ||
@@ -112,18 +110,15 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
112 | /// Contructor. Adds "expect_hg_user" and "check" xmlrpc method handlers | 110 | /// Contructor. Adds "expect_hg_user" and "check" xmlrpc method handlers |
113 | /// </summary> | 111 | /// </summary> |
114 | /// <param name="servers_info"></param> | 112 | /// <param name="servers_info"></param> |
115 | /// <param name="httpServe"></param> | 113 | public HGGridServices(NetworkServersInfo servers_info, SceneManager sman) |
116 | public HGGridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman) | ||
117 | { | 114 | { |
118 | serversInfo = servers_info; | 115 | serversInfo = servers_info; |
119 | httpServer = httpServe; | ||
120 | m_assetcache = asscache; | ||
121 | m_sceneman = sman; | 116 | m_sceneman = sman; |
122 | 117 | ||
123 | random = new Random(); | 118 | random = new Random(); |
124 | 119 | ||
125 | httpServer.AddXmlRPCHandler("link_region", LinkRegionRequest); | 120 | MainServer.Instance.AddXmlRPCHandler("link_region", LinkRegionRequest); |
126 | httpServer.AddXmlRPCHandler("expect_hg_user", ExpectHGUser); | 121 | MainServer.Instance.AddXmlRPCHandler("expect_hg_user", ExpectHGUser); |
127 | 122 | ||
128 | HGNetworkServersInfo.Init(servers_info.AssetURL, servers_info.InventoryURL, servers_info.UserURL); | 123 | HGNetworkServersInfo.Init(servers_info.AssetURL, servers_info.InventoryURL, servers_info.UserURL); |
129 | } | 124 | } |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs index 09a7fcc..5ce1e79 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs | |||
@@ -65,11 +65,11 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
65 | set { m_remoteBackend.RegionLoginsEnabled = value; } | 65 | set { m_remoteBackend.RegionLoginsEnabled = value; } |
66 | } | 66 | } |
67 | 67 | ||
68 | public HGGridServicesGridMode(NetworkServersInfo servers_info, BaseHttpServer httpServe, | 68 | public HGGridServicesGridMode(NetworkServersInfo servers_info, |
69 | IAssetCache asscache, SceneManager sman, UserProfileCacheService userv) | 69 | SceneManager sman, UserProfileCacheService userv) |
70 | : base(servers_info, httpServe, asscache, sman) | 70 | : base(servers_info, sman) |
71 | { | 71 | { |
72 | m_remoteBackend = new OGS1GridServices(servers_info, httpServe); | 72 | m_remoteBackend = new OGS1GridServices(servers_info); |
73 | m_userProfileCache = userv; | 73 | m_userProfileCache = userv; |
74 | } | 74 | } |
75 | 75 | ||
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs index e195853..828d0d9 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs | |||
@@ -77,12 +77,12 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
77 | 77 | ||
78 | 78 | ||
79 | public HGGridServicesStandalone(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman) | 79 | public HGGridServicesStandalone(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman) |
80 | : base(servers_info, httpServe, asscache, sman) | 80 | : base(servers_info, sman) |
81 | { | 81 | { |
82 | //Respond to Grid Services requests | 82 | //Respond to Grid Services requests |
83 | httpServer.AddXmlRPCHandler("logoff_user", LogOffUser); | 83 | MainServer.Instance.AddXmlRPCHandler("logoff_user", LogOffUser); |
84 | httpServer.AddXmlRPCHandler("check", PingCheckReply); | 84 | MainServer.Instance.AddXmlRPCHandler("check", PingCheckReply); |
85 | httpServer.AddXmlRPCHandler("land_data", LandData); | 85 | MainServer.Instance.AddXmlRPCHandler("land_data", LandData); |
86 | 86 | ||
87 | } | 87 | } |
88 | 88 | ||
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index ac3d64e..ceab75b 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -31,7 +31,6 @@ using OpenSim.Framework; | |||
31 | using OpenSim.Framework.Communications; | 31 | using OpenSim.Framework.Communications; |
32 | using OpenSim.Framework.Communications.Cache; | 32 | using OpenSim.Framework.Communications.Cache; |
33 | using OpenSim.Framework.Communications.Osp; | 33 | using OpenSim.Framework.Communications.Osp; |
34 | using OpenSim.Framework.Servers.HttpServer; | ||
35 | 34 | ||
36 | namespace OpenSim.Region.Communications.Local | 35 | namespace OpenSim.Region.Communications.Local |
37 | { | 36 | { |
@@ -40,11 +39,8 @@ namespace OpenSim.Region.Communications.Local | |||
40 | public CommunicationsLocal( | 39 | public CommunicationsLocal( |
41 | ConfigSettings configSettings, | 40 | ConfigSettings configSettings, |
42 | NetworkServersInfo serversInfo, | 41 | NetworkServersInfo serversInfo, |
43 | BaseHttpServer httpServer, | 42 | LibraryRootFolder libraryRootFolder) |
44 | IAssetCache assetCache, | 43 | : base(serversInfo, libraryRootFolder) |
45 | LibraryRootFolder libraryRootFolder, | ||
46 | bool dumpAssetsToFile) | ||
47 | : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder) | ||
48 | { | 44 | { |
49 | LocalInventoryService inventoryService = new LocalInventoryService(); | 45 | LocalInventoryService inventoryService = new LocalInventoryService(); |
50 | List<IInventoryDataPlugin> plugins | 46 | List<IInventoryDataPlugin> plugins |
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 03779c5..323f813 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs | |||
@@ -35,11 +35,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
35 | public class CommunicationsOGS1 : CommunicationsManager | 35 | public class CommunicationsOGS1 : CommunicationsManager |
36 | { | 36 | { |
37 | public CommunicationsOGS1( | 37 | public CommunicationsOGS1( |
38 | NetworkServersInfo serversInfo, BaseHttpServer httpServer, | 38 | NetworkServersInfo serversInfo, |
39 | IAssetCache assetCache, LibraryRootFolder libraryRootFolder) | 39 | LibraryRootFolder libraryRootFolder) |
40 | : base(serversInfo, httpServer, assetCache, false, libraryRootFolder) | 40 | : base(serversInfo, libraryRootFolder) |
41 | { | 41 | { |
42 | OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer); | 42 | OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo); |
43 | m_gridService = gridInterComms; | 43 | m_gridService = gridInterComms; |
44 | 44 | ||
45 | if (serversInfo.secureInventoryServer) | 45 | if (serversInfo.secureInventoryServer) |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index a526bb2..9ba84a7 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -59,7 +59,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
59 | 59 | ||
60 | public BaseHttpServer httpListener; | 60 | public BaseHttpServer httpListener; |
61 | public NetworkServersInfo serversInfo; | 61 | public NetworkServersInfo serversInfo; |
62 | public BaseHttpServer httpServer; | ||
63 | 62 | ||
64 | public string gdebugRegionName | 63 | public string gdebugRegionName |
65 | { | 64 | { |
@@ -85,19 +84,12 @@ namespace OpenSim.Region.Communications.OGS1 | |||
85 | /// </summary> | 84 | /// </summary> |
86 | /// <param name="servers_info"></param> | 85 | /// <param name="servers_info"></param> |
87 | /// <param name="httpServe"></param> | 86 | /// <param name="httpServe"></param> |
88 | public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe) | 87 | public OGS1GridServices(NetworkServersInfo servers_info) |
89 | { | 88 | { |
90 | serversInfo = servers_info; | 89 | serversInfo = servers_info; |
91 | httpServer = httpServe; | ||
92 | 90 | ||
93 | //Respond to Grid Services requests | 91 | //Respond to Grid Services requests |
94 | // httpServer.AddXmlRPCHandler("expect_user", ExpectUser); | 92 | MainServer.Instance.AddXmlRPCHandler("check", PingCheckReply); |
95 | // httpServer.AddXmlRPCHandler("logoff_user", LogOffUser); | ||
96 | httpServer.AddXmlRPCHandler("check", PingCheckReply); | ||
97 | |||
98 | // Retired into the new service connectors, 6/14/09 | ||
99 | //httpServer.AddXmlRPCHandler("land_data", LandData); | ||
100 | |||
101 | } | 93 | } |
102 | 94 | ||
103 | // see IGridServices | 95 | // see IGridServices |