Another bit of refactoring to try to make sense of OpenSim.Framework.Communications. Everything that looks like a service, with service handlers, moved to .Services -- i.e. LoginService and Response, and GridInfoService. The rest of the changes were to adapt to the new locations of those files.

0.6.5-rc1
diva 2009-03-29 22:04:45 +00:00
parent 08732b65be
commit f7eac63e01
12 changed files with 2114 additions and 2087 deletions

View File

@ -30,6 +30,7 @@ using System.Reflection;
using log4net;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Services;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Region.Communications.Hypergrid;
@ -210,7 +211,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
{
// Standalone mode
HGInventoryService inventoryService = new HGInventoryService(m_openSim.NetServersInfo.InventoryURL, null, false);
HGInventoryServiceClient inventoryService = new HGInventoryServiceClient(m_openSim.NetServersInfo.InventoryURL, null, false);
inventoryService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneInventoryPlugin, m_openSim.ConfigurationSettings.StandaloneInventorySource);
LocalUserServices userService =

View File

@ -36,6 +36,7 @@ using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Services;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Capabilities;
using OpenSim.Framework.Servers;

View File

@ -35,7 +35,7 @@ using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework.Servers;
namespace OpenSim.Framework.Communications
namespace OpenSim.Framework.Communications.Services
{
public class GridInfoService
{

View File

@ -52,19 +52,41 @@ namespace OpenSim.Framework.Communications.Services
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private InventoryServiceBase m_inventoryService;
private UserManagerBase m_userService;
IAssetDataPlugin m_assetProvider;
IHttpServer httpServer;
private string m_thisInventoryUrl = "http://localhost:9000";
private string m_thisHostname = "127.0.0.1";
private uint m_thisPort = 9000;
// These two used for local access, standalone mode
private UserManagerBase m_userService = null;
IAssetDataPlugin m_assetProvider = null;
public HGInventoryService(InventoryServiceBase invService, IAssetDataPlugin assetService, UserManagerBase userService, IHttpServer httpserver, string url)
// These two used for remote access
string m_UserServerURL = string.Empty;
string m_AssetServerURL = string.Empty;
// Constructor for grid inventory server
public HGInventoryService(InventoryServiceBase invService, string assetServiceURL, string userServiceURL, IHttpServer httpserver, string thisurl)
{
m_UserServerURL = userServiceURL;
m_AssetServerURL = assetServiceURL;
Init(invService, thisurl, httpserver);
}
// Constructor for standalone mode
public HGInventoryService(InventoryServiceBase invService, IAssetDataPlugin assetService, UserManagerBase userService, IHttpServer httpserver, string thisurl)
{
m_userService = userService;
m_assetProvider = assetService;
Init(invService, thisurl, httpserver);
}
private void Init(InventoryServiceBase invService, string thisurl, IHttpServer httpserver)
{
m_inventoryService = invService;
m_userService = userService;
m_thisInventoryUrl = url;
m_thisInventoryUrl = thisurl;
if (!m_thisInventoryUrl.EndsWith("/"))
m_thisInventoryUrl += "/";
@ -75,7 +97,6 @@ namespace OpenSim.Framework.Communications.Services
m_thisPort = (uint)uri.Port;
}
m_assetProvider = assetService;
httpServer = httpserver;
AddHttpHandlers();

View File

@ -34,7 +34,7 @@ using Nwc.XmlRpc;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework.Communications
namespace OpenSim.Framework.Communications.Services
{
/// <summary>
/// A temp class to handle login response.

View File

@ -40,7 +40,7 @@ using OpenMetaverse.StructuredData;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Statistics;
namespace OpenSim.Framework.Communications
namespace OpenSim.Framework.Communications.Services
{
public abstract class LoginService
{

View File

@ -34,6 +34,7 @@ using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using Nwc.XmlRpc;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Services;
using OpenSim.Region.Communications.Local;
using OpenSim.Tests.Common.Mock;
using OpenSim.Client.Linden;

View File

@ -34,6 +34,7 @@ using log4net.Config;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Services;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Grid.Communications.OGS1;

View File

@ -36,6 +36,7 @@ using OpenMetaverse;
using OpenSim.Data;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Services;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Capabilities;
using OpenSim.Framework.Servers;

View File

@ -36,6 +36,7 @@ using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Services;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console;
using OpenSim.Framework.Servers;

View File

@ -59,7 +59,7 @@ namespace OpenSim.Region.Communications.Hypergrid
m_osw = gridInterComms;
// The HG InventoryService always uses secure handlers
HGInventoryService invService = new HGInventoryService(serversInfo.InventoryURL, this.m_userProfileCacheService, true);
HGInventoryServiceClient invService = new HGInventoryServiceClient(serversInfo.InventoryURL, this.m_userProfileCacheService, true);
AddSecureInventoryService(invService);
m_defaultInventoryHost = invService.Host;
if (SecureInventoryService != null)

View File

@ -40,7 +40,7 @@ using OpenSim.Region.Communications.Local;
namespace OpenSim.Region.Communications.Hypergrid
{
public class HGInventoryService : LocalInventoryService, ISecureInventoryService
public class HGInventoryServiceClient : LocalInventoryService, ISecureInventoryService
{
private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@ -58,7 +58,7 @@ namespace OpenSim.Region.Communications.Hypergrid
set { m_userProfileCache = value; }
}
public HGInventoryService(string inventoryServerUrl, UserProfileCacheService userProfileCacheService, bool gridmode)
public HGInventoryServiceClient(string inventoryServerUrl, UserProfileCacheService userProfileCacheService, bool gridmode)
{
_inventoryServerUrl = HGNetworkServersInfo.ServerURI(inventoryServerUrl);
//m_Uri = new Uri(_inventoryServerUrl);