Poof! on Region.Communications.Hypergrid. Grid code deleted.

0.6.8-post-fixes
Diva Canto 2009-09-26 21:14:41 -07:00
parent f4bf581b96
commit 989382352d
6 changed files with 0 additions and 1465 deletions

View File

@ -187,18 +187,11 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder)
{
HGGridServicesStandalone gridService
= new HGGridServicesStandalone(
m_openSim.NetServersInfo, m_httpServer, m_openSim.SceneManager);
m_commsManager
= new HGCommunicationsStandalone(
m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer,
gridService,
libraryRootFolder, false);
HGServices = gridService;
CreateGridInfoService();
}
@ -209,8 +202,6 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
m_openSim.NetServersInfo,
m_openSim.SceneManager, libraryRootFolder);
HGServices = ((HGCommunicationsGridMode) m_commsManager).HGServices;
m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim));
if (m_openSim.userStatsURI != String.Empty)

View File

@ -40,21 +40,12 @@ namespace OpenSim.Region.Communications.Hypergrid
{
public class HGCommunicationsGridMode : CommunicationsManager // CommunicationsOGS1
{
IHyperlink m_osw = null;
public IHyperlink HGServices
{
get { return m_osw; }
}
public HGCommunicationsGridMode(
NetworkServersInfo serversInfo,
SceneManager sman, LibraryRootFolder libraryRootFolder)
: base(serversInfo, libraryRootFolder)
{
// From constructor at CommunicationsOGS1
HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, sman, m_userProfileCacheService);
m_gridService = gridInterComms;
m_osw = gridInterComms;
HGUserServices userServices = new HGUserServices(this);
// This plugin arrangement could eventually be configurable rather than hardcoded here.

View File

@ -44,7 +44,6 @@ namespace OpenSim.Region.Communications.Hypergrid
ConfigSettings configSettings,
NetworkServersInfo serversInfo,
BaseHttpServer httpServer,
HGGridServices gridService,
LibraryRootFolder libraryRootFolder,
bool dumpAssetsToFile)
: base(serversInfo, libraryRootFolder)
@ -64,8 +63,6 @@ namespace OpenSim.Region.Communications.Hypergrid
m_avatarService = hgUserService;
m_messageService = hgUserService;
gridService.UserProfileCache = m_userProfileCacheService;
m_gridService = gridService;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,159 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* 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
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Reflection;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Communications.OGS1;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Communications.Hypergrid
{
public class HGGridServicesGridMode : HGGridServices
{
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// Encapsulate remote backend services for manipulation of grid regions
/// </summary>
private OGS1GridServices m_remoteBackend = null;
public OGS1GridServices RemoteBackend
{
get { return m_remoteBackend; }
}
public override string gdebugRegionName
{
get { return m_remoteBackend.gdebugRegionName; }
set { m_remoteBackend.gdebugRegionName = value; }
}
public override bool RegionLoginsEnabled
{
get { return m_remoteBackend.RegionLoginsEnabled; }
set { m_remoteBackend.RegionLoginsEnabled = value; }
}
public HGGridServicesGridMode(NetworkServersInfo servers_info,
SceneManager sman, UserProfileCacheService userv)
: base(servers_info, sman)
{
m_remoteBackend = new OGS1GridServices(servers_info);
m_userProfileCache = userv;
}
#region IGridServices interface
public override RegionCommsListener RegisterRegion(RegionInfo regionInfo)
{
if (!regionInfo.RegionID.Equals(UUID.Zero))
{
m_regionsOnInstance.Add(regionInfo);
return m_remoteBackend.RegisterRegion(regionInfo);
}
else
return base.RegisterRegion(regionInfo);
}
public override bool DeregisterRegion(RegionInfo regionInfo)
{
bool success = base.DeregisterRegion(regionInfo);
if (!success)
success = m_remoteBackend.DeregisterRegion(regionInfo);
return success;
}
public override List<SimpleRegionInfo> RequestNeighbours(uint x, uint y)
{
List<SimpleRegionInfo> neighbours = m_remoteBackend.RequestNeighbours(x, y);
//List<SimpleRegionInfo> remotes = base.RequestNeighbours(x, y);
//neighbours.AddRange(remotes);
return neighbours;
}
public override RegionInfo RequestNeighbourInfo(UUID Region_UUID)
{
RegionInfo info = m_remoteBackend.RequestNeighbourInfo(Region_UUID);
if (info == null)
info = base.RequestNeighbourInfo(Region_UUID);
return info;
}
public override RegionInfo RequestNeighbourInfo(ulong regionHandle)
{
RegionInfo info = base.RequestNeighbourInfo(regionHandle);
if (info == null)
info = m_remoteBackend.RequestNeighbourInfo(regionHandle);
return info;
}
public override RegionInfo RequestClosestRegion(string regionName)
{
RegionInfo info = m_remoteBackend.RequestClosestRegion(regionName);
if (info == null)
info = base.RequestClosestRegion(regionName);
return info;
}
public override List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
{
List<MapBlockData> neighbours = m_remoteBackend.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
List<MapBlockData> remotes = base.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
neighbours.AddRange(remotes);
return neighbours;
}
public override LandData RequestLandData(ulong regionHandle, uint x, uint y)
{
LandData land = m_remoteBackend.RequestLandData(regionHandle, x, y);
if (land == null)
land = base.RequestLandData(regionHandle, x, y);
return land;
}
public override List<RegionInfo> RequestNamedRegions(string name, int maxNumber)
{
List<RegionInfo> infos = m_remoteBackend.RequestNamedRegions(name, maxNumber);
List<RegionInfo> remotes = base.RequestNamedRegions(name, maxNumber);
infos.AddRange(remotes);
return infos;
}
#endregion
}
}

View File

@ -1,259 +0,0 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSimulator Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* 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
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Reflection;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.Security.Authentication;
using log4net;
using Nwc.XmlRpc;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Communications.Local;
using OpenSim.Region.Communications.OGS1;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Communications.Hypergrid
{
public class HGGridServicesStandalone : HGGridServices
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// Encapsulate local backend services for manipulation of local regions
/// </summary>
protected LocalBackEndServices m_localBackend = new LocalBackEndServices();
//private Dictionary<ulong, int> m_deadRegionCache = new Dictionary<ulong, int>();
public LocalBackEndServices LocalBackend
{
get { return m_localBackend; }
}
public override string gdebugRegionName
{
get { return m_localBackend.gdebugRegionName; }
set { m_localBackend.gdebugRegionName = value; }
}
public override bool RegionLoginsEnabled
{
get { return m_localBackend.RegionLoginsEnabled; }
set { m_localBackend.RegionLoginsEnabled = value; }
}
public HGGridServicesStandalone(NetworkServersInfo servers_info, BaseHttpServer httpServe, SceneManager sman)
: base(servers_info, sman)
{
//Respond to Grid Services requests
MainServer.Instance.AddXmlRPCHandler("logoff_user", LogOffUser);
MainServer.Instance.AddXmlRPCHandler("check", PingCheckReply);
MainServer.Instance.AddXmlRPCHandler("land_data", LandData);
}
#region IGridServices interface
public override RegionCommsListener RegisterRegion(RegionInfo regionInfo)
{
if (!regionInfo.RegionID.Equals(UUID.Zero))
{
m_regionsOnInstance.Add(regionInfo);
return m_localBackend.RegisterRegion(regionInfo);
}
else
return base.RegisterRegion(regionInfo);
}
public override bool DeregisterRegion(RegionInfo regionInfo)
{
bool success = m_localBackend.DeregisterRegion(regionInfo);
if (!success)
success = base.DeregisterRegion(regionInfo);
return success;
}
public override List<SimpleRegionInfo> RequestNeighbours(uint x, uint y)
{
List<SimpleRegionInfo> neighbours = m_localBackend.RequestNeighbours(x, y);
//List<SimpleRegionInfo> remotes = base.RequestNeighbours(x, y);
//neighbours.AddRange(remotes);
return neighbours;
}
public override RegionInfo RequestNeighbourInfo(UUID Region_UUID)
{
RegionInfo info = m_localBackend.RequestNeighbourInfo(Region_UUID);
if (info == null)
info = base.RequestNeighbourInfo(Region_UUID);
return info;
}
public override RegionInfo RequestNeighbourInfo(ulong regionHandle)
{
RegionInfo info = m_localBackend.RequestNeighbourInfo(regionHandle);
//m_log.Info("[HGrid] Request neighbor info, local backend returned " + info);
if (info == null)
info = base.RequestNeighbourInfo(regionHandle);
return info;
}
public override RegionInfo RequestClosestRegion(string regionName)
{
RegionInfo info = m_localBackend.RequestClosestRegion(regionName);
if (info == null)
info = base.RequestClosestRegion(regionName);
return info;
}
public override List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
{
//m_log.Info("[HGrid] Request map blocks " + minX + "-" + minY + "-" + maxX + "-" + maxY);
List<MapBlockData> neighbours = m_localBackend.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
List<MapBlockData> remotes = base.RequestNeighbourMapBlocks(minX, minY, maxX, maxY);
neighbours.AddRange(remotes);
return neighbours;
}
public override LandData RequestLandData(ulong regionHandle, uint x, uint y)
{
LandData land = m_localBackend.RequestLandData(regionHandle, x, y);
if (land == null)
land = base.RequestLandData(regionHandle, x, y);
return land;
}
public override List<RegionInfo> RequestNamedRegions(string name, int maxNumber)
{
List<RegionInfo> infos = m_localBackend.RequestNamedRegions(name, maxNumber);
List<RegionInfo> remotes = base.RequestNamedRegions(name, maxNumber);
infos.AddRange(remotes);
return infos;
}
#endregion
#region XML Request Handlers
/// <summary>
/// A ping / version check
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public virtual XmlRpcResponse PingCheckReply(XmlRpcRequest request, IPEndPoint remoteClient)
{
XmlRpcResponse response = new XmlRpcResponse();
Hashtable respData = new Hashtable();
respData["online"] = "true";
m_localBackend.PingCheckReply(respData);
response.Value = respData;
return response;
}
// Grid Request Processing
/// <summary>
/// Ooops, our Agent must be dead if we're getting this request!
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public XmlRpcResponse LogOffUser(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Debug("[HGrid]: LogOff User Called");
Hashtable requestData = (Hashtable)request.Params[0];
string message = (string)requestData["message"];
UUID agentID = UUID.Zero;
UUID RegionSecret = UUID.Zero;
UUID.TryParse((string)requestData["agent_id"], out agentID);
UUID.TryParse((string)requestData["region_secret"], out RegionSecret);
ulong regionHandle = Convert.ToUInt64((string)requestData["regionhandle"]);
m_localBackend.TriggerLogOffUser(regionHandle, agentID, RegionSecret, message);
return new XmlRpcResponse();
}
/// <summary>
/// Someone asked us about parcel-information
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public XmlRpcResponse LandData(XmlRpcRequest request, IPEndPoint remoteClient)
{
Hashtable requestData = (Hashtable)request.Params[0];
ulong regionHandle = Convert.ToUInt64(requestData["region_handle"]);
uint x = Convert.ToUInt32(requestData["x"]);
uint y = Convert.ToUInt32(requestData["y"]);
m_log.DebugFormat("[HGrid]: Got XML reqeuest for land data at {0}, {1} in region {2}", x, y, regionHandle);
LandData landData = m_localBackend.RequestLandData(regionHandle, x, y);
Hashtable hash = new Hashtable();
if (landData != null)
{
// for now, only push out the data we need for answering a ParcelInfoReqeust
hash["AABBMax"] = landData.AABBMax.ToString();
hash["AABBMin"] = landData.AABBMin.ToString();
hash["Area"] = landData.Area.ToString();
hash["AuctionID"] = landData.AuctionID.ToString();
hash["Description"] = landData.Description;
hash["Flags"] = landData.Flags.ToString();
hash["GlobalID"] = landData.GlobalID.ToString();
hash["Name"] = landData.Name;
hash["OwnerID"] = landData.OwnerID.ToString();
hash["SalePrice"] = landData.SalePrice.ToString();
hash["SnapshotID"] = landData.SnapshotID.ToString();
hash["UserLocation"] = landData.UserLocation.ToString();
}
XmlRpcResponse response = new XmlRpcResponse();
response.Value = hash;
return response;
}
#endregion
}
}